Commit graph

5 commits

Author SHA1 Message Date
Peter Wagenet 153ce54b1e Added ValidationErrors#count in order to play nicely with Rails 2009-07-21 23:26:24 -07:00
Geoff Buesing 125689cd34 ValidationErrors#on: allow String field_name 2009-03-24 23:57:28 -07:00
Geoff Buesing d9417f3915 Extract humanize method from Extlib::Inflection to CouchRest.humanize, so that Extlib::Inflection dependency can be removed 2009-03-19 16:37:45 -07:00
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