instance method _compute_redirect_to_location

Ruby on Rails 4.0.13

Since v3.0.20 Last seen in v4.0.13 Private

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13

Signature

_compute_redirect_to_location(options)

No documentation comment.

Parameters

options req
Source
# File actionpack/lib/action_controller/metal/redirecting.rb, line 86
      def _compute_redirect_to_location(options)
        case options
        # The scheme name consist of a letter followed by any combination of
        # letters, digits, and the plus ("+"), period ("."), or hyphen ("-")
        # characters; and is terminated by a colon (":").
        # The protocol relative scheme starts with a double slash "//"
        when %r{\A(\w[\w+.-]*:|//).*}
          options
        when String
          request.protocol + request.host_with_port + options
        when :back
          request.headers["Referer"] or raise RedirectBackError
        when Proc
          _compute_redirect_to_location options.call
        else
          url_for(options)
        end.delete("\0\r\n")
      end

Defined in actionpack/lib/action_controller/metal/redirecting.rb line 86 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Redirecting

Type at least 2 characters to search.

↑↓ navigate · open · esc close