I'm j开发者_开发知识库ust starting to learn my way around CouchDB and Sinatra, but am struggling to find some basic examples of integrating the two via CouchRest. The CouchRest docs assume a little too much to be useful to me yet.
Does anyone have links to useful examples/articles/docs?
Sinatra docs are pretty great and easy to work with.
The examples in the couchrest repo seem to show a lot of use cases. https://github.com/couchrest/couchrest_model
The best way to understand code (and especially bleeding edge ruby) is to just read the code.
Updated, with link to tutorial: http://japhr.blogspot.com/2009/03/spike-sinatra-and-couchdb.html
You should probably look into the couch_potato library too, it just hits the sweet spot between the basic approach of couch rest and active record. Source and examples: https://github.com/langalex/couch_potato
精彩评论