Method: Hanami::Router#redirect
- Defined in:
- lib/hanami/router.rb
#redirect(path, options = {}, &endpoint) ⇒ Hanami::Routing::Route
Defines an HTTP redirect
615 616 617 |
# File 'lib/hanami/router.rb', line 615 def redirect(path, = {}, &endpoint) get(path).redirect @router.find(), [:code] || 301 end |