Commit graph

14 commits

Author SHA1 Message Date
Sam Lown
938bf2cf2c Fixing dirty tracking on collection_of association type 2011-05-20 02:15:18 +02:00
Sam Lown
760d855845 Fixing and testing proxyable with associations and validation 2011-04-05 20:41:24 +02:00
Sam Lown
8fa7e87019 working on proxy association and handling 2011-04-04 01:10:31 +02:00
Gleb Kanterov
2c091f5970 Test and fix for issue with belongs_to in CastedModel 2011-03-13 19:06:38 +06:00
Simone Carletti
f76517d0fa Narrow the rescued exception to avoid catching class evaluation errors that has nothing to to with the association.
Example:

    /Users/weppos/.rvm/gems/ruby-1.8.7-p330/gems/couchrest_model-1.0.0/lib/couchrest/model/associations.rb:29:in `belongs_to': Unable to convert class name into Constant for Document#dossier (RuntimeError)

although the real error is

    /Users/weppos/Projects/working/.../app/models/user.rb:56: undefined method `validates_uniqueness_of' for User:Class (NoMethodError)
2011-02-24 23:38:39 -03:00
Will Leinweber
626f997ff1 Remove typo in specs. (thanks Brian Colfer for spotting it) 2010-08-13 20:16:56 -05:00
Sam Lown
796f7d9f7e Raising an error when adding an un-saved item to a collection 2010-08-04 11:54:02 +02:00
Marcos Tapajós
1a551b54eb Adding tests to some expected behaviors 2010-08-03 22:55:17 -03:00
Sam Lown
b81d37fc02 Fixing association bug to avoid searching when foreign key is nil 2010-06-21 17:03:32 +02:00
Sam Lown
c280b3a29b Renaming to CouchRest Model
Refactored basic directory structure.
Moved to ActiveSupport for Validations and Callbacks.
Cleaned up older code, and removed support for text property types.
2010-06-20 22:01:11 +02:00
Sam Lown
1b89f1e1df Array Properties accept hash with ordered keys and raise error for anything else 2010-06-18 01:24:49 +02:00
Sam Lown
dd55466764 adding support for collection_of association 2010-06-17 15:02:33 +02:00
Sam Lown
fa0ab968a8 Adding associations to casted model 2010-06-17 02:43:17 +02:00
Sam Lown
a7a6b2f0ac adding initial support for belongs_to associations 2010-06-17 02:39:09 +02:00