diff --git a/lib/paperclip.rb b/lib/paperclip.rb index a3c7e213b..003cafd1e 100644 --- a/lib/paperclip.rb +++ b/lib/paperclip.rb @@ -173,13 +173,7 @@ module ClassMethods # end # end def has_attached_file(name, options = {}) - if attachment_definitions.nil? - self.attachment_definitions = {} - else - self.attachment_definitions = self.attachment_definitions.dup - end - - options = attachment_definitions[name] = Paperclip::AttachmentOptions.new(options) + options = Paperclip::AttachmentOptions.new(options) Paperclip.classes_with_attachments << self.name Paperclip.check_for_path_clash(name, options[:path], self.name) @@ -220,12 +214,6 @@ def has_attached_file(name, options = {}) attachment.send(:flush_errors) end end - - # Returns the attachment definitions defined by each call to - # has_attached_file. - def attachment_definitions - self.attachment_definitions - end end end diff --git a/lib/paperclip/glue.rb b/lib/paperclip/glue.rb index b358ae571..2d14c627a 100644 --- a/lib/paperclip/glue.rb +++ b/lib/paperclip/glue.rb @@ -9,7 +9,6 @@ def self.included(base) base.send :include, Callbacks base.send :include, Validators base.send :include, Schema if defined? ActiveRecord - base.class_attribute :attachment_definitions locale_path = Dir.glob(File.dirname(__FILE__) + "/locales/*.{rb,yml}") I18n.load_path += locale_path unless I18n.load_path.include?(locale_path)