Flowdock
method

normalize_argument_to_redirection

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActionController::Assertions::ResponseAssertions

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

These similar methods exist in v4.0.2:

normalize_argument_to_redirection(fragment) 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/assertions/response_assertions.rb, line 146
        def normalize_argument_to_redirection(fragment)
          case fragment
          when %r{^\w[\w\d+.-]*:.*}
            fragment
          when String
            if fragment =~ %r{^\w[\w\d+.-]*:.*}
              fragment
            else
              if fragment !~ /^\//
                ActiveSupport::Deprecation.warn "Omitting the leading slash on a path with assert_redirected_to is deprecated. Use '/#{fragment}' instead.", caller(2)
                fragment = "/#{fragment}"
              end
              @request.protocol + @request.host_with_port + fragment
            end
          when :back
            raise RedirectBackError unless refer = @request.headers["Referer"]
            refer
          else
            @controller.url_for(fragment)
          end.gsub(/[\r\n]/, '')
        end
Register or log in to add new notes.