method

normalize_protocol

Importance_0
v6.1.3.1 - Show latest stable - 0 notes - Class: ActionDispatch::Http::URL
normalize_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_dispatch/http/url.rb, line 140
          def normalize_protocol(protocol)
            case protocol
            when nil
              secure_protocol ? "https://" : "http://"
            when false, "//"
              "//"
            when PROTOCOL_REGEXP
              "#{$1}://"
            else
              raise ArgumentError, "Invalid :protocol option: #{protocol.inspect}"
            end
          end
Register or log in to add new notes.