Commit dad6086e by Mike Burns

Rid ourselves of attachment_definitions

parent d687fca1
......@@ -173,13 +173,7 @@ module Paperclip
# 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 @@ module Paperclip
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
......
......@@ -9,7 +9,6 @@ module Paperclip
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment