Commit 4a05a8a5 by Jon Yurek

Use attachment_for when validating attachments. Never know when someone might alias the method.

parent ca481b4a
......@@ -207,7 +207,8 @@ module Paperclip
end
validates_each(name) do |record, attr, value|
value.send(:flush_errors) unless value.valid?
attachment = record.attachment_for(name)
attachment.send(:flush_errors) unless attachment.valid?
end
end
......
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