couchrest_model/README.md

59 lines
1.8 KiB
Markdown
Raw Normal View History

# CouchRest::ExtendedDocument: CouchDB, not too close to the metal
2008-09-07 12:54:22 -07:00
CouchRest::ExtendedDocument adds additional functionality to the standard CouchRest Document class such as
setting properties, callbacks, typecasting, and validations.
2008-09-07 12:54:22 -07:00
Note: CouchRest only supports CouchDB 0.9.0 or newer.
2008-09-07 12:54:22 -07:00
## Install
2009-04-16 12:20:17 -07:00
$ sudo gem install couchrest_extended_document
2009-07-17 11:07:23 -07:00
## Usage
### General
2010-05-11 00:16:17 +02:00
require 'couchrest_extended_document'
class Cat < CouchRest::ExtendedDocument
property :name, :type => String
2008-09-07 12:54:22 -07:00
end
2008-09-07 12:54:22 -07:00
### Rails
In your environment.rb file require the gem as follows:
Rails::Initializer.run do |config|
....
config.gem "couchrest_extended_document"
....
end
## Testing
2008-09-07 12:54:22 -07:00
2008-10-02 10:57:13 -07:00
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).
2008-09-07 12:54:22 -07:00
2010-01-13 23:16:16 -02:00
## Docs
API: [http://rdoc.info/projects/couchrest/couchrest_extended_document](http://rdoc.info/projects/couchrest/couchrest_extended_document)
2010-01-13 21:07:59 -02:00
Check the wiki for documentation and examples [http://wiki.github.com/couchrest/couchrest](http://wiki.github.com/couchrest/couchrest)
2010-01-13 22:56:21 -02:00
2010-01-13 23:16:16 -02:00
## Contact
2010-01-13 22:56:21 -02:00
2010-03-30 21:38:26 -03:00
Please post bugs, suggestions and patches to the bug tracker at [http://github.com/couchrest/couchrest/issues](http://github.com/couchrest/couchrest/issues).
2010-01-13 22:56:21 -02:00
2010-03-30 21:38:26 -03:00
Follow us on Twitter: [http://twitter.com/couchrest](http://twitter.com/couchrest)
2010-01-13 22:56:21 -02:00
2010-03-30 21:38:26 -03:00
Also, check [http://twitter.com/#search?q=%23couchrest](http://twitter.com/#search?q=%23couchrest)
2009-07-17 11:07:23 -07:00
## Ruby on Rails
CouchRest is compatible with rails and can even be used a Rails plugin.
However, you might be interested in the CouchRest companion rails project:
2009-07-19 00:01:07 -07:00
[http://github.com/hpoydar/couchrest-rails](http://github.com/hpoydar/couchrest-rails)