On Nov 16, 2:05 pm, Julian Leviston <[EMAIL PROTECTED]> wrote: > If you request /location/3-san_diego, you'll get the same results as / > location/3 RIGHT NOW, won't you? Try it out.
The url creation part is the problem. i don't have a problem with the user typing in location/3-san_diego.. > If that's the case, then all you want is to modify the url() method so > that it looks at the object you pass it in (second param) and runs the > to_params method on it, if it exists. Do I have to override Merb's url() method? Please elaborate on this solution. I just want url(:location, location) to generate /location/3- san_diego" instead of "/location/3" for all instances. And if i have a nested resource in the future, i don't want to have to re-define another custom route. ex. if location has many shops, I would want the url method, url (:location_shops, location) to be able to generate "/location/3- san_diego/shops" > Is this too hard? No, it is not too hard but it is tedious to go through >20 files and replace every url(:location, location) with url(:location, location,:name => location.name). Sorry if my language came off as trying to bash Merb's way of handling URL routes. I'm merely trying to point out an instance where it is not very "easy" to define custom url paths. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
