Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add expiring_url as an alias for url

  • Loading branch information...
commit 27c0eee43db466aa9a6bc5ef8abd95b05e67d25f 1 parent 6687522
@aarellano aarellano authored jyurek committed
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/paperclip/attachment.rb
7 lib/paperclip/attachment.rb
@@ -146,6 +146,13 @@ def url(style_name = default_style, options = {})
+ # Alias to +url+ that allows using the expiring_url method provided by the cloud
+ # storage implementations, but keep using filesystem storage for development and
+ # testing.
+ def expiring_url(time = 3600, style_name = default_style)
+ url(style_name)
+ end
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.