Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
40a74fde
Commit
40a74fde
authored
Jun 15, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded file
parent
c1ad6f32
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
images.rake
+0
-21
No files found.
images.rake
deleted
100644 → 0
View file @
c1ad6f32
namespace
:images
do
desc
"Regenerate images"
task
:regenerate
=>
:environment
do
require
'open-uri'
OpportunityPhoto
.
all
.
each
do
|
photo
|
begin
old_name
=
photo
.
image_file_name
new_image
=
open
(
photo
.
image
.
url
(
:original
,
escape:
false
))
class
<<
new_image
def
original_filename
;
@original_filename
;
end
def
original_filename
=
(
name
);
@original_filename
=
name
;
end
end
new_image
.
original_filename
=
old_name
photo
.
image
=
new_image
photo
.
save
rescue
=>
e
puts
"ERROR:
#{
e
.
message
}
while processing
#{
photo
.
id
}
"
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment