I'm hoping that I'm unaware of a way of dealing with this kind of thing
and that hopefully someone here can shed some light on it. However, if
not, I guess I've got my work cut out for me. I suppose the solution
would be some sort of formalized way of dealing with polymorphic
resources. I'd have to devote some serious thought to that though.
In the plugin SimplyHelpful there are a number of polymorphic route
methods that will soon make its way into Edge. It allows you to do
polymorphic_url(@discussable) and get group_url(@discussable) if Group
is the class of the @discussable.
The plugin takes the attitude that trying model a polymorphic
relationship ("something has a discussion") with a monomorphic
controller (a single discussions controller) is a pain - you're
better off creating different controllers for each polymorph (IMHO).
There's stuff in the resource_fu to keep things DRY and it "plays
nice" with simply helpful