Commit 35b91fb7 by Prem Sichanugrist

Merge pull request #605 from ramn/master

Fix 293, 601: STI subclassing overwrites options
parents 64549cb4 2c6b7cb0
...@@ -316,6 +316,8 @@ module Paperclip ...@@ -316,6 +316,8 @@ module Paperclip
else else
write_inheritable_attribute(:attachment_definitions, {}) write_inheritable_attribute(:attachment_definitions, {})
end end
else
self.attachment_definitions = self.attachment_definitions.dup
end end
attachment_definitions[name] = {:validations => []}.merge(options) attachment_definitions[name] = {:validations => []}.merge(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