Flowdock
_compute_redirect_to_location(options) 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_controller/metal/redirecting.rb, line 89
      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 %{^(\w[\w+.-]*:|//).*}
          options
        when String
          request.protocol + request.host_with_port + options
        when :back
          raise RedirectBackError unless refer = request.headers["Referer"]
          refer
        when Proc
          _compute_redirect_to_location options.call
        else
          url_for(options)
        end.gsub(/[\00\\r\n]/, '')
      end
Register or log in to add new notes.