> At this point I have something like
>
> match( "/:module/:controller/:action/:id" ).to( :controller =>
> ":module/:controller" )
That should work, but you'd always have to use the *full* url,
including action and id.
This makes action and id optional:
match("/:module/:controller(/:action(/:id))").to(:controller =>
":module/:controller")
But in your case I would do this:
namespace(:admin) do
default_routes
end
default_routes
It works, though I'm not sure if it is the officially recommended way.
I haven't seen any router specs that use default_routes inside
namespaces.
Watch out for the order you specify your routes in. If you have a
default_routes first it will catch almost everything and other matches
or namespaces you set up after that will be useless.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---