method

reflect_on_association

rails latest stable - Class: ActiveRecord::Reflection::ClassMethods
reflect_on_association(association)
public

Returns the AssociationReflection object for the association (use the symbol).

Account.reflect_on_association(:owner)             # returns the owner AssociationReflection
Invoice.reflect_on_association(:line_items).macro  # returns :has_many