It worked nicely, until I added a second controller to my project. The
new (second) controller is “Admin”.
The problem is I cant reach the actions in the second controller.
http://mysite.com/some_action is routed to some_action in
default_controller. That is how I want it to be. But how do I reach
admin_action in the Admin controller? This doesnt work, for obvious
reasons:
It worked nicely, until I added a second controller to my project. The
new (second) controller is “Admin”.
The problem is I cant reach the actions in the second controller.
http://mysite.com/some_action is routed to some_action in
default_controller. That is how I want it to be. But how do I reach
admin_action in the Admin controller? This doesnt work, for obvious
reasons:
Routes are processed in the order they’re given in routes.rb, so if you
want to trap the admin controller, give it a route BEFORE the one
definining "
/:action’, :controller => ‘default_controller’" etc.
Put the most specific entries first, and the most general ones at the
bottom. That way you can trap the special cases before they’re resolved
by the general default case.
Jeff
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.