paperclip
https://github.com/thoughtbot/paperclip
Ruby
Easy file attachment management for ActiveRecord
Paperclip::ProcessorHelpers#register_processor
You can add your own processor via the Paperclip configuration. Normally
Paperclip will load all processors from the
Rails.root/lib/paperclip_processors directory, but here you can add any
existing class using this mechanism.
Paperclip.configure do |c|
c.register_processor :watermarker, WatermarkingProcessor.new
endEdit
git clone [email protected]:thoughtbot/paperclip.git
cd paperclip
open lib/paperclip/processor_helpers.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Paperclip--ProcessorHelpers-register_processor-for-pr
# Commit to gitgit add lib/paperclip/processor_helpers.rbgit commit -m "better docs for Paperclip::ProcessorHelpers#register_processor"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Paperclip--ProcessorHelpers-register_processor-for-pr
hub pull-request
# Celebrate!