This repository was archived by the owner on Oct 19, 2018. It is now read-only.
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
Method new on collection does not work #4
Open
Description
Example :
You have a Post model which has many Comment.
You cannot do in reactive-record
post.comments.new(title: "hello world")
So you have to do
post.comments << Comment.new(title: "hello world")
This patch seem to fix the problem :
module ReactiveRecord
class Collection
def new(*args)
self << klass.new(*args)
end
end
end
Metadata
Metadata
Assignees
Labels
No labels