If you request /location/3-san_diego, you'll get the same results as / location/3 RIGHT NOW, won't you? Try it out.
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. Is this too hard? Julian. On 17/11/2008, at 3:55 AM, [EMAIL PROTECTED] wrote: > >> If you ask me, binding resource information to the model is idiotic, >> as the model is NOT the resource, it's a sub-set of it. >> But hey, we work with what we've got ;-) > > Yes, I would prefer a solution like this: > in router.rb > resources locations, :default_param => ":id-:name" > so when the you call url(:location, location), it will fill it in with > "/location/3-san_diego" rather than force everything to using the id > "/ > location/3" > > This solves the issue of search/replacing all the url methods already > used and the default resource routes are preserved. > > But Merb doesn't support this way? > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
