Doing the simple stuff so you don't have to
Go to file
2010-06-15 01:26:23 +02:00
examples/model Moving to own repo without the base couchrest 2010-05-10 21:19:24 +02:00
lib Supporting new active_support setup for Rails 3 2010-06-15 01:24:31 +02:00
spec Supporting new active_support setup for Rails 3 2010-06-15 01:24:31 +02:00
utils s/localhost/127.0.0.1/ 2008-12-14 12:05:02 +01:00
.gitignore Moving to own repo without the base couchrest 2010-05-10 21:19:24 +02:00
history.txt updating history 2010-06-15 01:26:23 +02:00
init.rb Moving to own repo without the base couchrest 2010-05-10 21:19:24 +02:00
LICENSE added apache license 2008-09-11 21:31:59 -07:00
Rakefile Updating versions for beta release 2010-06-11 02:02:22 +02:00
README.md Updating versions for beta release 2010-06-11 02:02:22 +02:00
THANKS.md fix repository url 2010-01-13 21:25:17 -02:00

CouchRest::ExtendedDocument: CouchDB, not too close to the metal

CouchRest::ExtendedDocument adds additional functionality to the standard CouchRest Document class such as setting properties, callbacks, typecasting, and validations.

Note: CouchRest::ExtendedDocument only supports CouchDB 0.10.0 or newer.

Install

$ sudo gem install couchrest_extended_document

Usage

General

require 'couchrest_extended_document'

class Cat < CouchRest::ExtendedDocument

  property :name,      String
  property :lives,     Integer, :default => 9

  property :nicknames, [String]

  timestamps!

  view_by :name

end

Ruby on Rails

CouchRest::ExtendedDocument is compatible with rails and provides some ActiveRecord-like methods. You might also be interested in the CouchRest companion rails project: http://github.com/hpoydar/couchrest-rails

Rails 2.X

In your environment.rb file require the gem as follows:

Rails::Initializer.run do |config|
  ....
  config.gem "couchrest_extended_document"
  ....
end

Testing

The most complete documentation is the spec/ directory. To validate your CouchRest install, from the project root directory run rake, or autotest (requires RSpec and optionally ZenTest for autotest support).

Docs

API: http://rdoc.info/projects/couchrest/couchrest_extended_document

Check the wiki for documentation and examples http://wiki.github.com/couchrest/couchrest

Contact

Please post bugs, suggestions and patches to the bug tracker at http://github.com/couchrest/couchrest/issues.

Follow us on Twitter: http://twitter.com/couchrest

Also, check http://twitter.com/#search?q=%23couchrest