method

compute_public_path

Importance_0
v1.2.6 - Show latest stable - 0 notes - Class: ActionView::Helpers::AssetTagHelper
compute_public_path(source, dir, ext) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_view/helpers/asset_tag_helper.rb, line 200
        def compute_public_path(source, dir, ext)
          source = source.dup
          source << ".#{ext}" if File.extname(source).blank?
          unless source =~ %r{^[-a-z]+://}
            source = "/#{dir}/#{source}" unless source[0] == ?/
            asset_id = rails_asset_id(source)
            source << '?' + asset_id if defined?(RAILS_ROOT) && !asset_id.blank?
            source = "#{ActionController::Base.asset_host}#{@controller.request.relative_url_root}#{source}"
          end
          source
        end
Register or log in to add new notes.