On Jan 22, 2008 9:28 AM, Mislav Marohnić <[EMAIL PROTECTED]> wrote: > Yesterday I answered a question regarding polymorphic URL helpers on Core ML > and noticed that the module has no documentation. I've documented it and > rewritten unit tests using Mocha. I also optimized some of the code slightly > (nothing major, though). The patch also includes two fixes by Geoff Buesing, > who has done awesome work in this area in the past. > > http://dev.rubyonrails.org/ticket/10883 > > Check the documentation, please yell if anything is wrong: > > http://dev.rubyonrails.org/attachment/ticket/10883/PolymorphicRoutes.html?format=raw > > What's still broken? (I decided not to fix everything in one go.) > Hash argument: polymorphic_url(:id => @article). Test is commented out (like > before). > Should this work: polymorphic_url(@article, :format => :pdf) ? Currently it > doesn't. I've included a failing tests, it's commented out.Open ActionPack
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? > This one needs a discussion of its own: > http://dev.rubyonrails.org/ticket/9621 I think that's just an abuse of inheritance and I'm not sure we could do anything performant and reasonable to support that case, and the case where AssetsController is meant to handle all the different subclasses? -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
