Bulk save via argument to save, update, create#153
Bulk save via argument to save, update, create#153trey-jones wants to merge 1 commit intocouchrest:masterfrom trey-jones:eef4ba58e9007730159a98d7f840820b3ce4f65a
Conversation
|
This seems valuable. Any chance this could be merged in? |
|
Hey. It looks interesting, although I can't say I've ever needed to use something like this. However, I'm not willing to accept it in its current state. Firstly, there are no tests. Secondly, it seems to me that best approach would be to provide a Would gladly accept a refactored patch with tests ;-) |
|
Good morning. I obviously haven’t touched this in quite some time - in fact, the project that I used this for is my only experience with Rails and with couch. If I have some time later this week I might try and refactor, but if someone else would like to do that, I don’t think the patch was very extensive (just a few lines), and I’m sure a test for it would be equally simple. Trey Jones On May 27, 2014 at 6:04:43 AM, Sam Lown (notifications@github.com) wrote: Hey. It looks interesting, although I can't say I've ever need to use something like this. However, I'm not willing to accept it in its current state. Firstly, there are no tests. Secondly, it seems to me that best approach would be to provide a :bulk => true in the options hash, rather than adding in additional parameter. Would gladly accept a refactored patch with tests ;-) — |
Added 'bulk' optional parameter to save, update, and create methods of CouchRest::Model.
This uses couch's bulk_save functionality, which is already abstracted in CouchRest.