Method: ActiveRecord::Reflection::ClassMethods#reflections

Defined in:
lib/active_record/reflection.rb

#reflectionsObject

Returns a hash containing all AssociationReflection objects for the current class Example:

Invoice.reflections
Account.reflections


30
31
32
# File 'lib/active_record/reflection.rb', line 30

def reflections
  read_inheritable_attribute(:reflections) || write_inheritable_attribute(:reflections, {})
end