Class: Granite::Form::Model::Associations::Reflections::EmbedsMany
- Defined in:
- lib/granite/form/model/associations/reflections/embeds_many.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#name, #options, #parent_reflection
Class Method Summary collapse
Methods inherited from EmbedsAny
Methods inherited from Base
association_class, #belongs_to?, #build_association, #collection?, #default, generate_methods, #initialize, #klass, #macro, #read_source, #write_source
Constructor Details
This class inherits a constructor from Granite::Form::Model::Associations::Reflections::Base
Class Method Details
.build(target, generated_methods, name, options = {}, &block) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/granite/form/model/associations/reflections/embeds_many.rb', line 7 def self.build(target, generated_methods, name, = {}, &block) if target < Granite::Form::Model::Attributes target.add_attribute(Granite::Form::Model::Attributes::Reflections::Base, name, type: Object) end [:validate] = true unless .key?(:validate) super end |