Commit graph

4 commits

Author SHA1 Message Date
Matt Aimonetti 890b60cae4 added autovalidation (auto_validate! in your ExtendedDocument) and extracted some extlib stuff so we will soon be able to remove the dependency. 2009-02-05 17:06:12 -08:00
Matt Aimonetti dfdcd79a58 Started added a validation mixin
Usage:
  class Invoice < CouchRest::ExtendedDocument
    include CouchRest::Validation

    property :client_name
    property :employee_name
    property :location

    # Validation
    validates_present :client_name, :employee_name
    validates_present :location, :message => "Hey stupid!, you forgot the location"

  end
2009-02-02 19:21:32 -08:00
Matt Aimonetti 08c7f2107c moved stuff around and cleaned up some deprecation notices [save/save_doc] 2009-02-02 16:10:07 -08:00
Matt Aimonetti 6b2e5f84ad Started the refactoring work on couchrest.
* A server can have multiple defined available databases set to be used by documents (think DM repos)
* A server can have a default database so documents can easily share the same db connection
* Let a document class have a default database to use
* Give access to a document uri
* extracted some of the document features to a mixin
2009-01-28 22:55:42 -08:00