The base module that gets included in ActiveRecord::Base. See the documentation for Paperclip::ClassMethods for more useful information.
# File lib/paperclip.rb, line 91 def self.io_adapters @io_adapters ||= Paperclip::AdapterRegistry.new end
# File lib/paperclip.rb, line 87 def self.io_adapters=(new_registry) @io_adapters = new_registry end
Returns hash with styles missing from recent run of rake paperclip:refresh:missing_styles
{ :User => {:avatar => [:big]}, :Book => { :cover => [:croppable]}, } }
# File lib/paperclip/missing_attachment_styles.rb, line 64 def self.missing_attachments_styles current_styles = current_attachments_styles registered_styles = get_registered_attachments_styles Hash.new.tap do |missing_styles| current_styles.each do |klass, attachment_definitions| attachment_definitions.each do |attachment_name, styles| registered = registered_styles[klass][attachment_name] || [] rescue [] missed = styles - registered if missed.present? klass_sym = klass.to_s.to_sym missing_styles[klass_sym] ||= Hash.new missing_styles[klass_sym][attachment_name.to_sym] ||= Array.new missing_styles[klass_sym][attachment_name.to_sym].concat(missed.to_a) missing_styles[klass_sym][attachment_name.to_sym].map!(&:to_s).sort!.map!(&:to_sym).uniq! end end end end end
Provides configurability to Paperclip. The options available are:
whiny: Will raise an error if Paperclip cannot process thumbnails of an uploaded image. Defaults to true.
log: Logs progress to the Rails log. Uses ActiveRecord's logger, so honors log levels, etc. Defaults to true.
command_path: Defines the path at which to find the command line programs if they are not visible to Rails the system's search path. Defaults to nil, which uses the first executable found in the user's search path.
# File lib/paperclip.rb, line 76 def self.options @options ||= { :whiny => true, :image_magick_path => nil, :command_path => nil, :log => true, :log_command => true, :swallow_stderr => true } end
Generated with the Darkfish Rdoc Generator 2.