Sha256: b5e0532082e50d7bdce742c6b0a3efd37efba56005bcfe400bd03b8db79407cb
Contents?: true
Size: 658 Bytes
Versions: 8
Compression:
Stored size: 658 Bytes
Contents
# encoding: utf-8 module CarrierWave module Uploader module Url ## # === Returns # # [String] the location where this file is accessible via a url # 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 alias_method :to_s, :url ## # === Returns # # [String] A JSON serializtion containing this uploader's URL # def to_json { 'url' => url }.to_json end end # Url end # Uploader end # CarrierWave
Version data entries
8 entries across 8 versions & 2 rubygems