The base module that gets included in ActiveRecord::Base. See the documentation for Paperclip::ClassMethods for more useful information.
| VERSION | = | "2.8.0" unless defined? Paperclip::VERSION |
| classes_with_attachments | [RW] | |
| registered_attachments_styles_path | [W] |
Find all instances of the given Active Record model klass with attachment name. This method is used by the refresh rake tasks.
Log a paperclip-specific line. This will logs to STDOUT by default. Set Paperclip.options[:log] to false to turn off.
Returns hash with styles missing from recent run of rake paperclip:refresh:missing_styles
{
:User => {:avatar => [:big]},
:Book => {
:cover => [:croppable]},
}
}
Provides configurability to Paperclip. The options available are:
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
The run method takes the name of a binary to run, the arguments to that binary and some options:
:command_path -> A $PATH-like variable that defines where to look for the binary
on the filesystem. Colon-separated, just like $PATH.
:expected_outcodes -> An array of integers that defines the expected exit codes
of the binary. Defaults to [0].
:log_command -> Log the command being run when set to true (defaults to false).
This will only log if logging in general is set to true as well.
:swallow_stderr -> Set to true if you don't care what happens on STDERR.