Flowdock
method

rewrite_host_and_protocol

Importance_0
v3.2.3 - Show latest stable - 0 notes - Class: AssetPaths
rewrite_host_and_protocol(source, protocol = nil) 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/asset_paths.rb, line 61
    def rewrite_host_and_protocol(source, protocol = nil)
      host = compute_asset_host(source)
      if host && !is_uri?(host)
        if (protocol || default_protocol) == :request && !has_request?
          host = nil
        else
          host = "#{compute_protocol(protocol)}#{host}"
        end
      end
      host ? "#{host}#{source}" : source
    end
Register or log in to add new notes.