From 7eeeb8d530c60d5263e85e95a0562d2ca739c719 Mon Sep 17 00:00:00 2001 From: Mike Gehard Date: Sun, 23 Jan 2011 17:48:49 -0700 Subject: [PATCH] Add additional text to NotImplementedErrors [#6328 state:resolved] --- activemodel/lib/active_model/validator.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb index 0168233..1bb81d8 100644 --- a/activemodel/lib/active_model/validator.rb +++ b/activemodel/lib/active_model/validator.rb @@ -122,7 +122,7 @@ module ActiveModel #:nodoc: # Override this method in subclasses with validation logic, adding errors # to the records +errors+ array where necessary. def validate(record) - raise NotImplementedError + raise NotImplementedError, "Subclasses must implement a validate(record) method." end end @@ -158,7 +158,7 @@ module ActiveModel #:nodoc: # Override this method in subclasses with the validation logic, adding # errors to the records +errors+ array where necessary. def validate_each(record, attribute, value) - raise NotImplementedError + raise NotImplementedError, "Subclasses must implement a validate_each(record, attribute, value) method" end # Hook method that gets called by the initializer allowing verification -- 1.7.3.4