Class: ActionDispatch::Routing::OptionRedirect
- Defined in:
- lib/action_dispatch/routing/redirection.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Redirect
Instance Method Summary collapse
Methods inherited from Redirect
Constructor Details
This class inherits a constructor from ActionDispatch::Routing::Redirect
Instance Method Details
#path(params, request) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/action_dispatch/routing/redirection.rb', line 42 def path(params, request) = { :protocol => request.protocol, :host => request.host, :port => request.optional_port, :path => request.path, :params => request.query_parameters }.merge if !params.empty? && [:path].match(/%\{\w*\}/) [:path] = ([:path] % escape_path(params)) end ActionDispatch::Http::URL.url_for end |