Module: Racket::Helpers::Routing
- Defined in:
- lib/racket/helpers/routing.rb
Overview
Helper module that handles routing
Instance Method Summary collapse
-
#route(controller, action = nil, *params) ⇒ String
(also: #r)
Returns a route to an action within another controller.
-
#route_self(action = nil, *params) ⇒ String
(also: #rs)
Returns a route to an action within the current controller.
Instance Method Details
#route(controller, action = nil, *params) ⇒ String Also known as: r
Returns a route to an action within another controller.
30 31 32 |
# File 'lib/racket/helpers/routing.rb', line 30 def route(controller, action = nil, *params) controller.get_route(action, params) end |
#route_self(action = nil, *params) ⇒ String Also known as: rs
Returns a route to an action within the current controller.
41 42 43 |
# File 'lib/racket/helpers/routing.rb', line 41 def route_self(action = nil, *params) self.class.get_route(action, params) end |