_compute_redirect_to_location(request, options) public

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_controller/metal/redirecting.rb, line 96
    def _compute_redirect_to_location(request, options) #:nodoc:
      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 (":").
      # See http://tools.ietf.org/html/rfc3986#section-3.1
      # The protocol relative scheme starts with a double slash "//".
      when /\A([a-z][a-z\d\-+\.]*:|\/\/).*/
      when String
        request.protocol + request.host_with_port + options
      when :back
        ActiveSupport::Deprecation.warn(          `redirect_to :back` is deprecated and will be removed from Rails 5.1.          Please use `redirect_back(fallback_location: fallback_location)` where          `fallback_location` represents the location to use if the request has          no HTTP referer information..squish)
        request.headers["Referer"] or raise RedirectBackError
      when Proc
        _compute_redirect_to_location request, options.call
Register or log in to add new notes.