hi,
how can i define the routes such that url(:location, location) would
generate this url "/location/3-san_diego"  rather than "/location/3"

I don't understand this help page
http://wiki.merbivore.com/howto/router

In Rails, I can define the url in the model, not the routes file using
def to_param "#{id}-#{name}" end


O Nov 13, 11:40 am, "Michael Klishin" <[EMAIL PROTECTED]>
wrote:
> 2008/11/13 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> > Won't the router just catch urls, not define them?
>
> Router defines rules for both recognition and generation. Same thing
> in Django, Rails, Pylons and wherever else you can find the same
> routing table approach.
> --
> MK
--~--~---------~--~----~------------~-------~--~----~
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