I gotta agree here. Presuming that people should always use root-level routes is going too far. The URL carries a lot of information, and why shouldn't the developer have access to it? Plus I don't really see how this polymorphic routing magic has much effect on people's design decisions. I don't think anyone is going to arbitrarily choose nested routing just because they don't have to use a named helper. There are so many other considerations at play, and jamming an array into link_to is not exactly magically delicious.
It sounds like the real issue is that there are too many patches and too many bugs to manage. Well if it can't be implemented cleanly then maybe it should be pulled. But the whole "encouraging bad practices" seems spurious. On 7/7/07, Geoff B <[EMAIL PROTECTED]> wrote: > > I think a case can be made for using an [EMAIL PROTECTED], @track] nested > route > -- say a user browsed to album 45, and then clicked track 219 -- if > your UI requires a "back to album 45" navigational link on the track > page, you couldn't infer the referring album id from the resource id > alone if there's a many-to-many relationship between albums and tracks > -- instead, you'd need to grab the album id from the URI. > > On Jul 7, 11:04 am, Josh Peek <[EMAIL PROTECTED]> wrote: > > On Jul 7, 10:59 am, Geoff B <[EMAIL PROTECTED]> wrote: > > > > > So, are you saying that, instead of doing this: > > > > > link_to @track.name, [EMAIL PROTECTED], @track] > > > > > ...we should be required to do this: > > > > > link_to @track.name, album_track_path(@album, @track) > > > > I'm saying you should be doing ... > > > > link_to @track.name, @track > > > > Like I said, [EMAIL PROTECTED], @track] is giving you an excuse to use > > complex > > routing patterns. > > > > > -- Gabe da Silveira http://darwinweb.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
