vendor/bundle/ruby/1.9.1/gems/paperclip-3.5.4/lib/paperclip/attachment.rb
# Returns the public URL of the attachment with a given style. This does
# not necessarily need to point to a file that your Web server can access
# and can instead point to an action in your app, for example for fine grained
# security; this has a serious performance tradeoff.
#
# Options:
#
# +timestamp+ - Add a timestamp to the end of the URL. Default: true.
# +escape+    - Perform URI escaping to the URL. Default: true.
#
# Global controls (set on has_attached_file):
#
# +interpolator+  - The object that fills in a URL pattern's variables.
# +default_url+   - The image to show when the attachment has no image.
# +url+           - The URL for a saved image.
# +url_generator+ - The object that generates a URL. Default: Paperclip::UrlGenerator.
#
# As mentioned just above, the object that generates this URL can be passed
# in, for finer control. This object must respond to two methods:
#
# +#new(Paperclip::Attachment, options_hash)+
# +#for(style_name, options_hash)+
Returns the public URL of the attachment with a given style. This does
not necessarily need to point to a file that your Web server can access
and can instead point to an action in your app, for example for fine grained
security; this has a serious performance tradeoff.



+timestamp+ - Add a timestamp to the end of the URL. Default: true.
+escape+    - Perform URI escaping to the URL. Default: true.

Global controls (set on has_attached_file).

+interpolator+  - The object that fills in a URL pattern's variables.
+default_url+   - The image to show when the attachment has no image.
+url+           - The URL for a saved image.
+url_generator+ - The object that generates a URL.

As mentioned just above, the object that generates this URL can be passed
in, for finer control. This object must respond to two methods.


Returns the public URL of the attachment with a given style . This does not necessarily need to point to a file that your Web server can access and can instead point to an action in your app for example for fine grained security ; this has a serious performance tradeoff . + timestamp + - Add a timestamp to the end of the URL . Default : true . + escape + - Perform URI escaping to the URL . Default : true . Global controls ( set on has_attached_file ) . + interpolator + - The object that fills in a URL pattern ' s variables . + default_url + - The image to show when the attachment has no image . + url + - The URL for a saved image . + url_generator + - The object that generates a URL . As mentioned just above the object that generates this URL can be passed in for finer control . This object must respond to two methods .
def url(style_name = default_style, options = {})
      default_options = {:timestamp => @options[:use_timestamp], :escape => @options[:escape_url]}
      if options == true || options == false 
        @url_generator.for(style_name, default_options.merge(:timestamp => options))
      else
        @url_generator.for(style_name, default_options.merge(options))
      end
    end
def url ( style_name = default_style , options = { } ) default_options = { :timestamp => @options [ :use_timestamp ] , :escape => @options [ :escape_url ] } if options == true || options == false @url_generator . for ( style_name , default_options . merge ( :timestamp => options ) ) else @url_generator . for ( style_name , default_options . merge ( options ) ) end end
Returns the public URL of the attachment with a given style.
Returns the public URL of the attachment with a given style .
# Backwards compatibility.
style_name
<not_specific>
default_style
<not_specific>
options
<not_specific>