Flowdock
method

compute_protocol

Importance_0
v3.2.3 - Show latest stable - 0 notes - Class: AssetPaths
compute_protocol(protocol) 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 73
    def compute_protocol(protocol)
      protocol ||= default_protocol
      case protocol
      when :relative
        "//"
      when :request
        unless @controller
          invalid_asset_host!("The protocol requested was :request. Consider using :relative instead.")
        end
        @controller.request.protocol
      else
        "#{protocol}://"
      end
    end
Register or log in to add new notes.