Module: Regressor::Model::Nested::Attribute
- Included in:
- ActiveRecordModel
- Defined in:
- lib/model/active_record/nested/attribute.rb
Instance Method Summary collapse
Instance Method Details
#nested_attributes ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/model/active_record/nested/attribute.rb', line 5 def nested_attributes if @model.constantize..present? @model.constantize..keys.map do |key| "it { is_expected.to accept_nested_attributes_for :#{key} }" end.join("\n ") end end |