app/helpers/asset_helper.rb
def asset_url_for( filename )

    # get a host
    hostname = config.asset_host || root_url.gsub( /^\//, '' )

    # blah
    suff = ( Rails.env.development? ? "?#{Time.now.to_i}" : '' )

    # return
    "#{hostname}/#{Rails.application.config.assets[:url]}/#{versioned_filename_for( filename )}".gsub( /(?<!:)\/\/+/, '/' ) + suff

  end
# Returns the URL for a given asset, respecting versioning and hosting setup
#
# === Parameters
#
# [filename] _(string)_ the name of the file
Returns the URL for a given asset, respecting versioning and hosting setup
Parameters

[filename] _(string)_ the name of the file
Returns the URL for a given asset respecting versioning and hosting setup Parameters [ filename ] _ ( string ) _ the name of the file
def asset_url_for( filename )
    hostname = config.asset_host || root_url.gsub( /^\//, '' )
    suff = ( Rails.env.development? ? "?#{Time.now.to_i}" : '' )
    "#{hostname}/#{Rails.application.config.assets[:url]}/#{versioned_filename_for( filename )}".gsub( /(?<!:)\/\/+/, '/' ) + suff
  end
def asset_url_for ( filename ) hostname = config . asset_host || root_url . gsub ( / ^ \/ / , '' ) suff = ( Rails . env . development? ? "?#{Time.now.to_i}" : '' ) "#{hostname}/#{Rails.application.config.assets[:url]}/#{versioned_filename_for( filename )}" . gsub ( / (?<!:) \/ \/ + / , '/' ) + suff end
Returns the URL for a given asset, respecting versioning and hosting setup
 Parameters
Returns the URL for a given asset respecting versioning and hosting setup Parameters
# get a host # blah # return
filename