Skip to content

Commit

Permalink
fix read/write inheritable attribute deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
bhbryant committed Mar 21, 2012
1 parent 3bb3535 commit 4485243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/paperclip.rb
Expand Up @@ -235,7 +235,7 @@ module ClassMethods
def has_attached_file name, options = {}
include InstanceMethods

write_inheritable_attribute(:attachment_definitions, {}) if attachment_definitions.nil?
self._attachment_definitions = {} if attachment_definitions.nil?
attachment_definitions[name] = {:validations => []}.merge(options)

after_save :save_attached_files
Expand Down Expand Up @@ -381,7 +381,7 @@ def validates_attachment_content_type name, options = {}
# Returns the attachment definitions defined by each call to
# has_attached_file.
def attachment_definitions
read_inheritable_attribute(:attachment_definitions)
self._attachment_definitions
end
end

Expand Down

0 comments on commit 4485243

Please sign in to comment.