On 7/7/07, Josh Peek <[EMAIL PROTECTED]> wrote:
>
> I've seen a ton of tickets of people trying to extend
> polymorphic_path([...]) to do
> everything for them when a proper work around with named routes will
> do.



You are assuming that you know what the route will be.  When developing a
controller to handle a polymorphic resource its quite often that you don't
know the type of the objects, thus polymorphic_path([EMAIL PROTECTED], @child])
becomes much cleaner then a nested if or case statement.

I am actively using this feature on two large scale applications which are
deployed into production and it has helped me to maintain skinny polymorphic
controllers.


-- 
Josh Knowles
[EMAIL PROTECTED]
http://joshknowles.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
-~----------~----~----~----~------~----~------~--~---

Reply via email to