paperclip
https://github.com/thoughtbot/paperclip
Ruby
Easy file attachment management for ActiveRecord
Paperclip::Shoulda#should_validate_attachment_content_type
Tests that you have content_type validations specified. There are two options, :valid and :invalid. Both accept an array of strings. The strings should be a list of content types which will pass and fail validation, respectively.
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_content_type-for-pr
# Commit to gitgit add shoulda_macros/paperclip.rbgit commit -m "better docs for Paperclip::Shoulda#should_validate_attachment_content_type"
# 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_content_type-for-pr
hub pull-request
# Celebrate!