paperclip

https://github.com/thoughtbot/paperclip

Ruby

Easy file attachment management for ActiveRecord

Paperclip::Validators::HelperMethods#do_not_validate_attachment_file_type

Places ActiveModel validations on the presence of a file.
Options:
* +if+: A lambda or name of an instance method. Validation will only
  be run if this lambda or method returns true.
* +unless+: Same as +if+ but validates if lambda or method returns false.

Source | Google | Stack overflow

Edit

git clone [email protected]:thoughtbot/paperclip.git

cd paperclip

open lib/paperclip/validators/attachment_file_type_ignorance_validator.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Paperclip--Validators--HelperMethods-do_not_validate_attachment_file_type-for-pr


# Commit to git

git add lib/paperclip/validators/attachment_file_type_ignorance_validator.rbgit commit -m "better docs for Paperclip::Validators::HelperMethods#do_not_validate_attachment_file_type"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Paperclip--Validators--HelperMethods-do_not_validate_attachment_file_type-for-pr

hub pull-request


# Celebrate!