Re: Hatred towards Nested Polymorphic Paths

Josh Knowles
2007-07-10T06:55:28Z

On 7/7/07, Josh Peek <joshpeek@gmail.com> 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([@parent, @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
joshknowles@gmail.com