lib/paperclip.rb in paperclip-2.5.2 vs lib/paperclip.rb in paperclip-2.6.0
- old
+ new
@@ -35,10 +35,11 @@
require 'paperclip/processor'
require 'paperclip/thumbnail'
require 'paperclip/interpolations'
require 'paperclip/style'
require 'paperclip/attachment'
+require 'paperclip/attachment_options'
require 'paperclip/storage'
require 'paperclip/callback_compatibility'
require 'paperclip/missing_attachment_styles'
require 'paperclip/railtie'
require 'logger'
@@ -323,10 +324,10 @@
end
else
self.attachment_definitions = self.attachment_definitions.dup
end
- attachment_definitions[name] = {:validations => []}.merge(options)
+ attachment_definitions[name] = Paperclip::AttachmentOptions.new(options)
Paperclip.classes_with_attachments << self.name
Paperclip.check_for_url_clash(name,attachment_definitions[name][:url],self.name)
after_save :save_attached_files
before_destroy :prepare_for_destroy