Commit graph

21 commits

Author SHA1 Message Date
Sam Lown
2b0694e1e2 Merged 2010-06-16 21:04:53 +02:00
Sam Lown
b0d2258bd3 Improving handling of mime types, instanciation of documents from the
database, and more dependencies on active_support.
2010-05-12 23:43:17 +02:00
Sam Lown
3894579304 Moving to own repo without the base couchrest 2010-05-10 21:19:24 +02:00
Sam Lown
dd3df8fb69 Adding support for defining cast_as on properties as a Class 2010-03-30 20:50:47 +00:00
Will Leinweber
15ea10eb9c attempt to merge wildchild/type_cast, still failing specs 2010-02-17 16:35:42 -06:00
Tapajós
58d621d399 Changing some validations to be compatible with activemodel. 2009-10-31 09:54:16 -02:00
Peter Wagenet
153ce54b1e Added ValidationErrors#count in order to play nicely with Rails 2009-07-21 23:26:24 -07:00
wildchild
e27135cb1e Fixed required_field_validator to behave correctly with boolean fields 2009-07-21 03:18:07 +06:00
Rob Kaufman
baabe40674 Fixed validates_is_numeric when dealing with an actual float 2009-07-08 09:17:07 -07:00
Matt Aimonetti
e48a6c8866 fixed all the specs so we are back to green 2009-05-26 18:27:49 -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
72542dc876 fixed a bug with validation 2009-02-20 18:32:01 -08:00
Matt Aimonetti
2f8caa8740 added a new validator 2009-02-20 15:34:49 -08:00
Matt Aimonetti
c0abafd1e0 fixed a major bug with inheritance and the class database setup. (plus some validation bugs) 2009-02-10 16:10:35 -08:00
Matt Aimonetti
e448112ff6 fixed some serious issues but left some for tomorrow (validations aren't working right) 2009-02-10 02:15:39 -08:00
Matt Aimonetti
621f5565e9 Started working on casted models, basic functionalities are now in.
property :casted_attribute, :cast_as => 'WithCastedModelMixin'

A casted attribute now knows about its parent. (#casted_by to retrieve the parent's object)
2009-02-09 11:20:23 -08:00
Matt Aimonetti
fa7b176fce [extended-document] added support for property :name, :default => 'Matt" and default couchrest type 2009-02-05 18:57:11 -08: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
fec21c3ff3 got rid of extlib hooking system in favor of the new Rails3 callback system. As well as fixed timestamps! in ExtendedDoc 2009-02-03 17:33:31 -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