Module: ActionView::Helpers::AssetUrlHelper

Defined in:
lib/cloudinary/helper.rb

Instance Method Summary collapse

Instance Method Details

#original_path_to_assetObject



363
# File 'lib/cloudinary/helper.rb', line 363

alias :original_path_to_asset :path_to_asset

#path_to_asset(source, options = {}) ⇒ Object



365
366
367
368
369
370
371
# File 'lib/cloudinary/helper.rb', line 365

def path_to_asset(source, options={})
  options ||= {}
  if Cloudinary.config.enhance_image_tag && options[:type] == :image
    source = Cloudinary::Utils.cloudinary_url(source, options.merge(:type=>:asset))
  end
  original_path_to_asset(source, options)
end