From 428d3044385796febd8ad49a3436d780a89ab31a Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Thu, 2 Oct 2008 17:16:49 -0700 Subject: [PATCH] argument error --- lib/couchrest/core/model.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/couchrest/core/model.rb b/lib/couchrest/core/model.rb index 233e5e6..9b2560d 100644 --- a/lib/couchrest/core/model.rb +++ b/lib/couchrest/core/model.rb @@ -418,7 +418,7 @@ module CouchRest elsif target.is_a?(Class) self[k] = target.new(self[k]) else - raise ArgumentError, ":as => MyClass, :as => [MyClass]" + raise ArgumentError, "Call like - cast :field, :as => MyClass - or - :as => [MyClass] if the field is an array." end end end