Commit 4b795307 by Prem Sichanugrist

Check for existance of class_attribute setter

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