Module Her::Model::NestedAttributes::ClassMethods
In: lib/her/model/nested_attributes.rb

Methods

Public Instance methods

Allow nested attributes for an association

@example

  class User
    include Her::Model

    has_one :role
    accepts_nested_attributes_for :role
  end

  class Role
    include Her::Model
  end

  user = User.new(name: "Tobias", role_attributes: { title: "moderator" })
  user.role # => #<Role title="moderator">

[Validate]