aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorMike Gehard <mike.gehard@gmail.com>2011-02-09 06:32:40 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-03-12 13:43:23 -0200
commit58de03f077b0da1cb923f28835b00cd092de3c08 (patch)
tree5fc257dbfc60dd6603c39d4535ddb95dc73837ab /activemodel
parent63c8ea9a6a28ecaabb236dae094d99d9d1ee2ecd (diff)
downloadrails-58de03f077b0da1cb923f28835b00cd092de3c08.tar.gz
rails-58de03f077b0da1cb923f28835b00cd092de3c08.tar.bz2
rails-58de03f077b0da1cb923f28835b00cd092de3c08.zip
Add additional text to NotImplementedErrors [#6328 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/validator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb
index 1c6123eb09..c5ed8d22d3 100644
--- a/activemodel/lib/active_model/validator.rb
+++ b/activemodel/lib/active_model/validator.rb
@@ -120,7 +120,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
@@ -156,7 +156,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