module Regressor::Model::Nested::Attribute

Public Instance Methods

nested_attributes() click to toggle source
# File lib/model/active_record/nested/attribute.rb, line 5
def nested_attributes
  if @model.constantize.nested_attributes_options.present?
    @model.constantize.nested_attributes_options.keys.map do |key|
      "it { is_expected.to accept_nested_attributes_for :#{key} }"
    end.join("\n  ")
  end
end