lib/image/crop/is_image_cropped.rb in image-crop-0.1.0 vs lib/image/crop/is_image_cropped.rb in image-crop-0.1.1
- old
+ new
@@ -4,10 +4,10 @@
define_method 'process_cropped_images' do
attr_names.each do |attr|
if eval("self.#{attr}")
image = Paperclip.io_adapters.for(eval("self.#{attr}"))
- image.original_filename = "cropped_file_#{Time.now.to_f.to_s.gsub('.','')}"
+ image.original_filename = "cropped_file_#{Time.now.to_f.to_s.gsub('.','')}.#{self.picture_content_type.split('/').last}"
eval("self.#{attr} = image")
end
end
end
end