carrierwave
https://github.com/jnicklas/carrierwave
Ruby
Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
CarrierWave::Validations::ActiveModel::HelperMethods#validates_integrity_of
Makes the record invalid if the file couldn't be uploaded due to an integrity error Accepts the usual parameters for validations in Rails (:if, :unless, etc...)
Edit
git clone [email protected]:jnicklas/carrierwave.git
cd carrierwave
open lib/carrierwave/validations/active_model.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-CarrierWave--Validations--ActiveModel--HelperMethods-validates_integrity_of-for-pr
# Commit to gitgit add lib/carrierwave/validations/active_model.rbgit commit -m "better docs for CarrierWave::Validations::ActiveModel::HelperMethods#validates_integrity_of"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-CarrierWave--Validations--ActiveModel--HelperMethods-validates_integrity_of-for-pr
hub pull-request
# Celebrate!