Module: NestedRecord::Macro::ClassMethods
- Defined in:
- lib/nested_record/macro.rb
Instance Method Summary collapse
- #has_many_nested(name, **options, &block) ⇒ Object
- #has_one_nested(name, **options, &block) ⇒ Object
- #nested_accessors(from:, **options, &block) ⇒ Object
Instance Method Details
#has_many_nested(name, **options, &block) ⇒ Object
7 8 9 |
# File 'lib/nested_record/macro.rb', line 7 def has_many_nested(name, **, &block) NestedRecord::Setup::HasMany.new(self, name, **, &block) end |
#has_one_nested(name, **options, &block) ⇒ Object
11 12 13 |
# File 'lib/nested_record/macro.rb', line 11 def has_one_nested(name, **, &block) NestedRecord::Setup::HasOne.new(self, name, **, &block) end |
#nested_accessors(from:, **options, &block) ⇒ Object
15 16 17 |
# File 'lib/nested_record/macro.rb', line 15 def nested_accessors(from:, **, &block) NestedRecord::NestedAccessorsSetup.new(self, from, **, &block) end |