Method: ActiveData::Model::Associations::Reflections::EmbedsMany.build

Defined in:
lib/active_data/model/associations/reflections/embeds_many.rb

.build(target, generated_methods, name, options = {}, &block) ⇒ Object



6
7
8
9
10
# File 'lib/active_data/model/associations/reflections/embeds_many.rb', line 6

def self.build(target, generated_methods, name, options = {}, &block)
  target.add_attribute(ActiveData::Model::Attributes::Reflections::Base, name) if target < ActiveData::Model::Attributes
  options[:validate] = true unless options.key?(:validate)
  super
end