aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/README.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/README.rdoc')
-rw-r--r--activemodel/README.rdoc2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/README.rdoc b/activemodel/README.rdoc
index f6beff14e1..0985f56bfb 100644
--- a/activemodel/README.rdoc
+++ b/activemodel/README.rdoc
@@ -219,7 +219,7 @@ behavior out of the box:
class HasNameValidator < ActiveModel::Validator
def validate(record)
- record.errors[:name] = "must exist" if record.name.blank?
+ record.errors.messages[:name] << "must exist" if record.name.blank?
end
end