2008/1/22 Michael Koziarski <[EMAIL PROTECTED]>:

> > 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.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?


In my experience, formatted_foo_path(@foo, :pdf) and
formatted_foo_path(@foo, :format => :pdf) are identical. Still, my patch
only adds support for formatted_polymorphic_path([EMAIL PROTECTED], :pdf]), and 
I've put
the hash argument up for discussion.

> 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?


I agree with such thinking; I'd only like these issues regarding polymorphic
helpers resolved. Make the API concrete, reject features we don't want etc.
Thanks Koz

P.S. somehow you avoided to comment on my patch :D

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to