Is there a way to find all Polymorphic models of a specific polymorphic type in Rails? So if I have Group, Event, and Project all with a declaration like:
has_many :assignments, :as => :assignable
Can I do something like:
Assignable.all
...or
BuiltInRailsPolymorphicHelper.all("assignable")
That would be nice.
Edit:
... such that Assignable.all
returns [Event, Group, Product]
(array of classes)