---
I added lambda support to the size and content type validator, so now you can do something like:
<code>validates_attachment_size :avatar, :less_than => 2.megabytes, :message => lambda { I18n.t(invalid_image_size) }</code>
This is consistent with Rails validators, wich receive either a String or a Proc.
Regards.
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| fixtures | Loading commit data... | |
| matchers | Loading commit data... | |
| .gitignore | Loading commit data... | |
| attachment_test.rb | Loading commit data... | |
| command_line_test.rb | Loading commit data... | |
| database.yml | Loading commit data... | |
| geometry_test.rb | Loading commit data... | |
| helper.rb | Loading commit data... | |
| integration_test.rb | Loading commit data... | |
| interpolations_test.rb | Loading commit data... | |
| iostream_test.rb | Loading commit data... | |
| paperclip_test.rb | Loading commit data... | |
| processor_test.rb | Loading commit data... | |
| storage_test.rb | Loading commit data... | |
| style_test.rb | Loading commit data... | |
| thumbnail_test.rb | Loading commit data... | |
| upfile_test.rb | Loading commit data... |