Reputation: 9499
I want to write a catch all route for my Admin
controller so I don't have to define a lot of routes.
I was thinking something like this would work:
match "/admin(/:action)(/:id)"
but obviously not.
Whats the best way to go about this? I only want this for the Admin
controller nothing else.
Upvotes: 1
Views: 181
Reputation: 54882
I think this one will work for you:
match "/admin(/:action)(/:id)", controller: 'admin'
But I am not sure on how it will behaves for the path "/admin" (no params[:action]).
Upvotes: 1