Commit 4b795307 by Prem Sichanugrist

Check for existance of class_attribute setter

parent 6fca437d
...@@ -324,7 +324,11 @@ module Paperclip ...@@ -324,7 +324,11 @@ module Paperclip
write_inheritable_attribute(:attachment_definitions, {}) write_inheritable_attribute(:attachment_definitions, {})
end end
else else
self.attachment_definitions = self.attachment_definitions.dup if respond_to?(:class_attribute)
self.attachment_definitions = self.attachment_definitions.dup
else
write_inheritable_attribute(:attachment_definitions, self.attachment_definitions.dup)
end
end end
attachment_definitions[name] = Paperclip::AttachmentOptions.new(options) attachment_definitions[name] = Paperclip::AttachmentOptions.new(options)
......
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