Module: Usher::Interface::RackInterface::Route
- Defined in:
- lib/usher/interface/rack_interface/route.rb
Instance Method Summary collapse
-
#redirect(path, status = 302) ⇒ Object
add(“/index.html”).redirect(“/”).
Instance Method Details
#redirect(path, status = 302) ⇒ Object
add(“/index.html”).redirect(“/”)
6 7 8 9 10 11 12 |
# File 'lib/usher/interface/rack_interface/route.rb', line 6 def redirect(path, status = 302) lambda do response = Rack::Response.new response.redirect(path, status) response.finish end end |