Class | Her::Model::Associations::HasManyAssociation |
In: |
lib/her/model/associations/has_many_association.rb
|
Parent: | Association |
Initialize a new object with a foreign key to the parent
@example
class User include Her::Model has_many :comments end class Comment include Her::Model end user = User.find(1) new_comment = user.comments.build(:body => "Hello!") new_comment # => #<Comment user_id=1 body="Hello!">
TODO: This only merges the id of the parents, handle the case
where this is more deeply nested