Class: ActionDispatch::Routing::PathRedirect
- Inherits:
-
Redirect
- Object
- Redirect
- ActionDispatch::Routing::PathRedirect
show all
- Defined in:
- 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
#inspect ⇒ Object
72
73
74
|
# File 'lib/action_dispatch/routing/redirection.rb', line 72
def inspect
"redirect(#{status}, #{block})"
end
|
#path(params, request) ⇒ Object
68
69
70
|
# File 'lib/action_dispatch/routing/redirection.rb', line 68
def path(params, request)
(params.empty? || !block.match(/%\{\w*\}/)) ? block : (block % escape(params))
end
|