Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove version conditional from rake task

  • Loading branch information...
commit 8390516f435fd59cee08bb352041b2d1739a3a5a 1 parent b3f9690
@sikachu sikachu authored
Showing with 2 additions and 10 deletions.
  1. +2 −10 lib/tasks/paperclip.rake
View
12 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
Please sign in to comment.
Something went wrong with that request. Please try again.