Commit graph

10 commits

Author SHA1 Message Date
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