match("/news").register.name(:news) is not supposed to work. I find
it strange that it does. You need to specify the controller that you
want to route to somehow. Routing is a two way street. I would
recommend that you create your actual routes in the namespace.
Something like this:
namespace(:market) do
match("/news").to(:controller => "news").full_name(:news)
default_routes
end
Hope that helps.
On Nov 10, 7:31 pm, "Per Melin" <[EMAIL PROTECTED]> wrote:
> > I do not understand semantics of using a namespace here
>
> I'm looking at an app with in the neighbourhood of 50 controllers. To
> bring some order I'm thinking about putting them all into one of 6-10
> namespaces (i.e. directories and modules).
>
> I've tried to use variations of one generic rule:
>
> match("/:module/:controller(/:action(.:format))").to(:controller =>
> ":module/:controller").name(:default)
>
> But that's not as convenient as namespaces since you can't do:
>
> url(:controller => "market/news", :action => "list")
>
> Instead you need to use more words:
>
> url(:module => "market", :controller => "news", :action => "list")
>
> But there is really no problem here. Namespaces works fine. I'm happy.
> I was just looking for the shortest possible form of naming a route.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---