couchbase / couchbase-ruby-model

The Active Model implementation for Couchbase Server built on couchbase-ruby-client
61 stars 23 forks source link

Added as_json method for rails JSON responses #1

Closed stakach closed 11 years ago

stakach commented 11 years ago

Added as_json method for rails JSON responses

Allows the following to occur in a controller: render :json => model.as_json(:except => :some_secret_field)

Where model is a Couchbase::Model

I've also written a deterministic id generator based on the counter id pattern at http://couchbasemodels.com/ if you are interested in including it? Supports up to 340282366920938463426481119284349108225 documents of each model per cluster before manual intervention is required. Has built in XDCR support to avoid any id clashes too.

avsej commented 11 years ago

Hi, Stephen

Thanks for patch, it seems like I don't receive notification here. (next time just mention @avsej here :)

This repository is just mirror of our primary one, which integrated with gerrit code review tool. Could you please register (it is simple with openid) and accept our CLA. After that I can merge your patch which I've uploaded there already http://review.couchbase.org/23391

Next time it would be faster if you will make gerrit patch and put me in reviewers list.

Thank you again.

Sergey Avseyev

avsej commented 11 years ago

And of course I always interested in contributions. Just ping me if you have some code

stakach commented 11 years ago

Thanks @avsej I've registered and accepted the CLA.

avsej commented 11 years ago

merged, thanks