Answered for me in the IRC channel.

the trick is using the :path option

resources :categories, :path => "cat"


On Dec 15, 5:38 pm, Jacques Crocker <[email protected]> wrote:
> I'm trying to define a resource that should have a different name in
> the URL than it will when I access use it in my app.
>
> For example:
> resources :categories
>
> For legacy reasons, I'd like my urls to map to /cat/new, /cat/5, etc.
> But I'd rather use resource(:categories) to refer to it in my code.
>
> In Rails 2.1 I was able to use the :as option when defining the
> resource. For example:
> map.resources :categories, :as => "all"
>
> Doesn't look like Merb supports this option. Is there an equivalent
> nice way to alias my resource so it shows up differently in the url.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to