Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use :original style when refreshing metadata

Closes #213
  • Loading branch information...
commit 791b70d73e95b68d76c2b635f79dae766d64abb8 1 parent 9050ecd
S. Brent Faulkner sbfaulkner authored sikachu committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/tasks/paperclip.rake
2  lib/tasks/paperclip.rake
@@ -41,7 +41,7 @@ namespace :paperclip do
names = obtain_attachments(klass)
names.each do |name|
Paperclip.each_instance_with_attachment(klass, name) do |instance|
- if file = instance.send(name).to_file
+ if file = instance.send(name).to_file(:original)
instance.send("#{name}_file_name=", instance.send("#{name}_file_name").strip)
instance.send("#{name}_content_type=", file.content_type.strip)
instance.send("#{name}_file_size=", file.size) if instance.respond_to?("#{name}_file_size")
Please sign in to comment.
Something went wrong with that request. Please try again.