Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove unneeded file

  • Loading branch information...
commit 40a74fde2a911f2b3f63e46598e3a7e9a38be2f9 1 parent c1ad6f3
@sikachu sikachu authored
Showing with 0 additions and 21 deletions.
  1. +0 −21 images.rake
View
21 images.rake
@@ -1,21 +0,0 @@
-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
Please sign in to comment.
Something went wrong with that request. Please try again.