method

normalize_protocol

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 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 133
          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.