module CarrierWave::Uploader::Url

Public Instance Methods

to_json(*args) click to toggle source

Returns

String

A JSON serializtion containing this uploader’s URL

# File lib/carrierwave/uploader/url.rb, line 26
def to_json(*args)
  { 'url' => url }.to_json(*args)
end
to_s() click to toggle source
Alias for: url
url() click to toggle source

Returns

String

the location where this file is accessible via a url

# 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.expand_path(current_path).gsub(File.expand_path(root), '')
  end
end
Also aliased as: to_s