Module: CarrierWave::Uploader::Url
- Defined in:
- lib/carrierwave/uploader/url.rb
Instance Method Summary collapse
-
#url ⇒ Object
Returns [String] the location where this file is accessible via a url.
Instance Method Details
#url ⇒ Object
Returns
- String
-
the location where this file is accessible via a url
11 12 13 14 15 16 17 |
# File 'lib/carrierwave/uploader/url.rb', line 11 def url if file.respond_to?(:url) and not file.url.blank? file.url elsif current_path File.(current_path).gsub(File.(root), HasMedia.directory_uri) end end |