Module: Ext::Forward::Base
- Defined in:
- lib/ext/forward.rb
Instance Method Summary collapse
-
#forward(controller, method = @method, *a) ⇒ Object
Forwards to another controller.
Instance Method Details
#forward(controller, method = @method, *a) ⇒ Object
Forwards to another controller
-
controller : the other controller
-
method : the designed method, actual method if not specified
-
*args : method arguments
86 87 88 89 90 91 92 93 94 95 |
# File 'lib/ext/forward.rb', line 86 def forward(controller, method=@method, *a) # method selector, :method=>'get' or 'post' if /NotFound$/ =~ controller.name # facility for NotFound controller a = [e['PATH_INFO']] if a.empty? or not a.first method = 'get' end raise Forwarder.new(controller, method, *a) end |