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
  end

Source | Google | Stack overflow

Edit

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

cd paperclip

open lib/paperclip/processor_helpers.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Paperclip--ProcessorHelpers-register_processor-for-pr


# Commit to git

git add lib/paperclip/processor_helpers.rbgit commit -m "better docs for Paperclip::ProcessorHelpers#register_processor"


# 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--ProcessorHelpers-register_processor-for-pr

hub pull-request


# Celebrate!