Class: ActionDispatch::Routing::PathRedirect
- Inherits:
-
Redirect
show all
- Defined in:
- actionpack/lib/action_dispatch/routing/redirection.rb
Instance Attribute Summary
Attributes inherited from Redirect
#block, #status
Instance Method Summary
collapse
Methods inherited from Redirect
#call, #initialize
Instance Method Details
58
59
60
|
# File 'actionpack/lib/action_dispatch/routing/redirection.rb', line 58
def inspect
"redirect(#{status}, #{block})"
end
|
#path(params, request) ⇒ Object
54
55
56
|
# File 'actionpack/lib/action_dispatch/routing/redirection.rb', line 54
def path(params, request)
(params.empty? || !block.match(/%\{\w*\}/)) ? block : (block % escape(params))
end
|