Taking the polymorphic associations example from rubyonrails.org and using the models below:
class Picture < ActiveRecord::Base
belongs_to :imageable, polymorphic: true
end
class Employee < ActiveRecord::Base
has_many :pictures, as: :imageable
end
class Product < ActiveRecord::Base
has_many :pictures, as: :imageable
end
How do I go about finding the valid imageable_type
s?
E.g. so that it'd return: [:employee, :product]