better docs

This commit is contained in:
Chris Anderson 2008-09-30 10:20:15 -07:00
parent b3b58ffa83
commit 0e5eb76459
2 changed files with 6 additions and 0 deletions

View file

@ -22,6 +22,7 @@ spec = Gem::Specification.new do |s|
s.executables << 'couchapp'
s.add_dependency("json", ">= 1.1.2")
s.add_dependency("rest-client", ">= 0.5")
s.add_dependency("extlib", ">= 0.9.6")
end
namespace :github do # thanks merb!

View file

@ -1,4 +1,7 @@
# = CouchRest::Model - ORM, the CouchDB way
module CouchRest
# = CouchRest::Model - ORM, the CouchDB way
#
# CouchRest::Model provides an ORM-like interface for CouchDB documents. It avoids all usage of <tt>method_missing</tt>, and tries to strike a balance between usability and magic. See CouchRest::Model::MagicViews#view_by for documentation about the view-generation system. For the other class methods, inspiried by DataMapper and ActiveRecord, see CouchRest::Model::ClassMethods. The InstanceMethods are pretty basic.
#
# ==== Example
@ -223,6 +226,8 @@ module CouchRest
#
# Custom views can be queried with <tt>:reduce => true</tt> to return reduce results. The default for custom views is to query with <tt>:reduce => false</tt>.
#
# Views are generated (on a per-model basis) lazily on first-access. This means that if you are deploying changes to a view, the views for that model won't be available until generation is complete. This can take some time with large databases. Strategies are in the works.
#
# To understand the capabilities of this view system more compeletly, it is recommended that you read the RSpec file at <tt>spec/core/model.rb</tt>.
def view_by *keys
opts = keys.pop if keys.last.is_a?(Hash)