Flowdock
method

rewrite_host_and_protocol

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: AssetPaths

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

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 67
    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.