check the merb book source code, for some more examples but here is what I
would try if I were you:
match('/:language', :language => /^[a-z]{2}$/).to(:controller =>
"articles") do
match("/articles/:article_id").to(:action => "show").name(:article)
match("/articles").name(:articles)
end
Good luck,
- Matt
On Mon, Feb 16, 2009 at 9:51 AM, Joaquin Rivera Padron
<[email protected]>wrote:
> hey there,
> I am trying to build a routes like this:
> /es/articles/ARTICLE-ID
> to get compiled into:
> :controller => :articles, :action => :show, :language => 'es'
> and also for index
> es/articles
> into:
> :controller => :articles, :action => :index, :language => 'es'
> I am searching the merb routing code and specs, but any shortcuts would be
> appreciated until I get to manage the power of the router and its multiple
> uses
>
> thanks in advance,
> joaquin
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---