Module: Paperclip
- Defined in:
- lib/paperclip.rb,
lib/paperclip/upfile.rb,
lib/paperclip/geometry.rb,
lib/paperclip/thumbnail.rb,
lib/paperclip/attachment.rb
Overview
The base module that gets included in ActiveRecord::Base. See the documentation for Paperclip::ClassMethods for more useful information.
Defined Under Namespace
Modules: ClassMethods, InstanceMethods, Upfile Classes: Attachment, Geometry, NotIdentifiedByImageMagickError, PaperclipError, Tempfile, Thumbnail
Constant Summary collapse
- VERSION =
"2.1.2"
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
-
.options ⇒ Object
Provides configurability to Paperclip.
-
.path_for_command(command) ⇒ Object
:nodoc:.
Class Method Details
.included(base) ⇒ Object
:nodoc:
61 62 63 |
# File 'lib/paperclip.rb', line 61 def included base #:nodoc: base.extend ClassMethods end |
.options ⇒ Object
Provides configurability to Paperclip. There are a number of options available, such as:
-
whiny_thumbnails: Will raise an error if Paperclip cannot process thumbnails of an uploaded image. Defaults to true.
-
image_magick_path: Defines the path at which to find the
convertandidentifyprograms if they are not visible to Rails the system’s search path. Defaults to nil, which uses the first executable found in the search path.
49 50 51 52 53 54 |
# File 'lib/paperclip.rb', line 49 def ||= { :whiny_thumbnails => true, :image_magick_path => nil } end |
.path_for_command(command) ⇒ Object
:nodoc:
56 57 58 59 |
# File 'lib/paperclip.rb', line 56 def path_for_command command #:nodoc: path = [[:image_magick_path], command].compact File.join(*path) end |