On 1/21/08, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > On Jan 22, 2008 9:28 AM, Mislav Marohnić <[EMAIL PROTECTED]> > wrote: > > > > Should this work: polymorphic_url(@article, :format => :pdf) ? Currently > it > > doesn't. I've included a failing tests, it's commented out.OpenActionPack > > I don't think it should work with these 'advanced' hash arguments. do > they do the right thing when passing through to the optimised named > route generators? Do we want to support them going forwards? > > Koz, I've often wondered why (apart from specific implementation reasons) we need a formatted_xxx helper to cater for formats at all.
Bearing in mind that the generated helper code (including optimization stuff) could just look at the size of the hash and whether it's only member is :format, is there a reason the generated helpers can't simply distinguish between these signatures? album_path(an_album) album_path(an_album, :format => :xml) albums_path() albums_path(:format => :xml) Somehow that seems easier on the eyes than: album_path(an_album) formatted_album_path(an_album, :xml) albums_path() formatted_albums_path(:xml) I think it's because formatted_ seems to just add noise to the method name. The format isn't (to me) the most important thing, it's more of an afterthought. Keeping it's specification exclusively in the params mirrors that imho. Regards, Trevor -- -- Trevor Squires http://somethinglearned.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
