YourClass.reflect_on_all_associations.map(&:name)
Get the class name by calling class_name
, or the type of the association (belongs_to, has_many,...) by calling macro
Posted to makandra dev (2012-10-31 19:37)
YourClass.reflect_on_all_associations.map(&:name)
Get the class name by calling class_name
, or the type of the association (belongs_to, has_many,...) by calling macro