Module: ActiveRecord::Reflection::ClassMethods

Defined in:
lib/active_record/embeds_reflection.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#create_reflection_with_embeds(macro, name, scope, options, active_record) ⇒ Object



51
52
53
54
55
56
57
58
# File 'lib/active_record/embeds_reflection.rb', line 51

def create_reflection_with_embeds(macro, name, options, active_record)
  unless macro == :embeds_one
    return create_reflection_without_embeds(macro, name, options, active_record)
  end
  AssociationReflection.new(macro, name, options, active_record).tap do |reflection|
    reflections.merge!(name => reflection)
  end
end