Class: ActionDispatch::Routing::OptionRedirect
- Defined in:
- actionpack/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
#inspect ⇒ Object
87 88 89 |
# File 'actionpack/lib/action_dispatch/routing/redirection.rb', line 87 def inspect "redirect(#{status}, #{.map{ |k,v| "#{k}: #{v}" }.join(', ')})" end |
#path(params, request) ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'actionpack/lib/action_dispatch/routing/redirection.rb', line 71 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 |