Module | Paperclip::Interpolations |
In: |
lib/paperclip/interpolations.rb
|
This module contains all the methods that are available for interpolation in paths and urls. To add your own (or override an existing one), you can either open this module and define it, or call the Paperclip.interpolates method.
Hash assignment of interpolations. Included only for compatibility, and is not intended for normal use.
Perform the actual interpolation. Takes the pattern to interpolate and the arguments to pass, which are the attachment and style name. You can pass a method name on your record as a symbol, which should turn an interpolation pattern for Paperclip to use.
Returns the pluralized form of the attachment name. e.g. "avatars" for an attachment of :avatar
Returns a the attachment hash. See Paperclip::Attachment#hash_key for more details.
Returns the timestamp as defined by the <attachment>_updated_at field in the server default time zone unless :use_global_time_zone is set to false. Note that a Rails.config.time_zone change will still invalidate any path or URL that uses :timestamp. For a time_zone-agnostic timestamp, use updated_at.
Returns an integer timestamp that is time zone-neutral, so that paths remain valid even if a server‘s time zone changes.