instance method _compute_redirect_to_location

Ruby on Rails 3.0.20

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 76
      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 (":").
        when %r{^\w[\w+.-]*:.*}
          options
        when String
          request.protocol + request.host_with_port + options
        when :back
          raise RedirectBackError unless refer = request.headers["Referer"]
          refer
        else
          url_for(options)
        end.gsub(/[\0\r\n]/, '')
      end

Defined in actionpack/lib/action_controller/metal/redirecting.rb line 76 · 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