Commit a1596bb6 by jyurek

Made Paperclip::Attachment.path public


git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@452 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
parent 37e40653
...@@ -83,6 +83,14 @@ module Paperclip ...@@ -83,6 +83,14 @@ module Paperclip
@file ? interpolate(@url, style) : interpolate(@default_url, style) @file ? interpolate(@url, style) : interpolate(@default_url, style)
end end
# Returns the path of the attachment as defined by the :path optionn. 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 th URL,
# and the :bucket option refers to the S3 bucket.
def path style = nil #:nodoc:
interpolate(@path, style)
end
# Alias to +url+ # Alias to +url+
def to_s style = nil def to_s style = nil
url(style) url(style)
...@@ -214,10 +222,6 @@ module Paperclip ...@@ -214,10 +222,6 @@ module Paperclip
pattern pattern
end end
def path style = nil #:nodoc:
interpolate(@path, style)
end
def queue_existing_for_delete #:nodoc: def queue_existing_for_delete #:nodoc:
@queued_for_delete += @processed_files.values @queued_for_delete += @processed_files.values
@file = nil @file = nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment