Method: Paperclip::Attachment#path
- Defined in:
- lib/paperclip/attachment.rb
#path(style_name = default_style) ⇒ Object
Returns the path of the attachment as defined by the :path option. If the file is stored in the filesystem the path refers to the path of the file on disk. If the file is stored in S3, the path is the “key” part of the URL, and the :bucket option refers to the S3 bucket.
125 126 127 |
# File 'lib/paperclip/attachment.rb', line 125 def path style_name = default_style original_filename.nil? ? nil : interpolate(@path, style_name) end |