paperclip
https://github.com/thoughtbot/paperclip
Ruby
Easy file attachment management for ActiveRecord
Paperclip::Shoulda#should_validate_attachment_size
Tests to ensure that you have file size validations turned on. You can pass the same options to this that you can to validate_attachment_file_size - :less_than, :greater_than, and :in. :less_than checks that a file is less than a certain size, :greater_than checks that a file is more than a certain size, and :in takes a Range or Array which specifies the lower and upper limits of the file size.
Edit
git clone [email protected]:thoughtbot/paperclip.git
cd paperclip
open shoulda_macros/paperclip.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Paperclip--Shoulda-should_validate_attachment_size-for-pr
# Commit to gitgit add shoulda_macros/paperclip.rbgit commit -m "better docs for Paperclip::Shoulda#should_validate_attachment_size"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Paperclip--Shoulda-should_validate_attachment_size-for-pr
hub pull-request
# Celebrate!