diff --git a/lib/tasks/paperclip.rake b/lib/tasks/paperclip.rake index bca5f6121..388bdfdf2 100644 --- a/lib/tasks/paperclip.rake +++ b/lib/tasks/paperclip.rake @@ -49,11 +49,7 @@ namespace :paperclip do instance.send("#{name}_file_name=", instance.send("#{name}_file_name").strip) instance.send("#{name}_content_type=", file.content_type.to_s.strip) instance.send("#{name}_file_size=", file.size) if instance.respond_to?("#{name}_file_size") - if Rails.version >= "3.0.0" - instance.save(:validate => false) - else - instance.save(false) - end + instance.save(:validate => false) else true end @@ -88,11 +84,7 @@ namespace :paperclip do attributes = %w(file_size file_name content_type).map{ |suffix| "#{name}_#{suffix}".to_sym } if attributes.any?{ |attribute| instance.errors[attribute].present? } instance.send("#{name}=", nil) - if Rails.version >= "3.0.0" - instance.save(:validate => false) - else - instance.save(false) - end + instance.save(:validate => false) end end end