Commit graph

28 commits

Author SHA1 Message Date
Tapajós 58d621d399 Changing some validations to be compatible with activemodel. 2009-10-31 09:54:16 -02:00
Peter Gumeson 1938270d65 Merge commit 'mattetti/master' 2009-08-12 16:48:13 -07:00
Matt Aimonetti a17df45fc3 made all the specs run on 1.9.2, yay :) 2009-08-01 14:21:18 -07:00
Peter Gumeson 7bae8acc36 Merge branch 'new_callbacks' 2009-07-18 23:37:16 -07:00
Peter Gumeson cdf998b185 Merge commit 'sethladd/master' 2009-06-12 12:17:15 -07:00
Peter Gumeson e94403ca28 Added a spec for saving a casted array 2009-06-11 23:34:02 -07:00
Seth Ladd 92d7fdb94d refactoring how casting works 2009-06-09 18:02:04 -10:00
Peter Gumeson ab362cb32c More convenient callback alias methods 2009-06-07 17:01:21 -07:00
Peter Gumeson dc4787e905 Integrated Yehuda's new callback code from rails 2009-06-07 02:57:22 -07:00
Peter Gumeson 76b1563539 Renamed new_document? and new_model? to simply new? 2009-06-04 20:44:44 -07:00
Peter Gumeson b4e2250668 Added validation callbacks to extended documents and casted models 2009-06-04 19:49:10 -07:00
Peter Gumeson 91cd1d9c7b base_doc should be nil for unassociated casted models 2009-05-30 23:20:39 -07:00
Peter Gumeson d012380b67 Added helper for accessing the top level document. And more rails compatibility. 2009-05-28 22:42:30 -07:00
Peter Gumeson 23341f3698 Added new_model? and new_record? alias to casted model for rails compatibility. 2009-05-28 16:09:53 -07:00
Peter Gumeson 9a026997dd valid? now recursively checks casted models. Added better validation spec coverage. 2009-05-28 12:18:23 -07:00
Peter Gumeson 704d0a09bd Added attributes= to casted model and extended doc 2009-05-27 13:24:25 -07:00
Eric Watson dff005f082 Modified CastedModel to apply defaults first
(so the defaults don't overwrite modified values)
Included failing (and now passing) specs
2009-05-26 15:51:30 -07:00
Eric Watson 0647307acd Enabled apply_defaults for CastedModel 2009-05-26 15:48:04 -07:00
Matt Aimonetti 2596df1a3d added cascading validations for extended documents using casted models. Most code comes from nrstott's contribution 2009-05-13 22:50:29 -07:00
Matt Aimonetti 92b77a9649 fixed bulk_load/get_bulk and the specs 2009-05-13 20:44:57 -07:00
Nathan 0c0b6ecff2 added spec to show problem with validation of array of casted models 2009-05-13 20:29:44 -07:00
YAMAMOTO Yohei 6fca60ebe4 fixed a bug with CastedModel constructer calling Hash#initialize(ifnone)
Signed-off-by: Matt Aimonetti <mattaimonetti@gmail.com>
2009-04-28 11:32:59 +08:00
Matt 2aeb90721e corrected some spec dependencies 2009-03-08 14:27:30 +00:00
Matt Aimonetti c4cce18389 added database.bulk_delete as an alias for #bulk_save, added support for Model.by_view_name in ExtendedDoc and bumped the version to 0.13.3 2009-02-17 00:36:11 -08:00
Matt Aimonetti 3a57ed1414 fixed a bug with the RestClient optimization, added more callbacks on the ExtendedDocument and added support for casted arrays of objects. 2009-02-12 20:28:07 -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