Closed andru closed 10 years ago
This seems like a good addition, though I think the merge
functionality belongs in create
. Gonna fix up the getByCid
issue before merging. :+1:
Merged above and tweaked a bit in 8649210abc83c3c27e4149975ea45461e4e09e68. Let me know what you think!
It was useful to me to have a simple way to find if a model matching a set of attributes exists without necessarily creating it.
This pull request extracts the logic responsible for finding a model in the
model.all
collection from themodel.create
method into a newmodel.find
. Themodel.create
method is updated to use the newfind
method.