Module: CarrierWave::Support::UriFilename

Defined in:
lib/carrierwave/support/uri_filename.rb

Class Method Summary collapse

Class Method Details

.filename(url) ⇒ Object


6
7
8
9
10
# File 'lib/carrierwave/support/uri_filename.rb', line 6

def self.filename(url)
  path = url.split('?').first

  CGI.unescape(path).gsub(%r{.*/(.*?$)}, '\1')
end