Make sure you call the methods in the following order and not vice versa:
has_attached_file :image
validates_attachment_presence :image
Validation with condition works fine, too:
validates_attachment_presence :image, :if => :method
This is because validates_attachment_presence
is only available after saying has_attached_file
.
Posted by Martin Straub to makandra dev (2012-04-19 15:12)