Module: Regressor::Model::Nested::Attribute
- Included in:
- RegressionModel
- Defined in:
- lib/generators/regressor/model/nested/attribute.rb
Instance Method Summary collapse
Instance Method Details
#nested_attributes ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/generators/regressor/model/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\t") end end |