aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validator.rb
diff options
context:
space:
mode:
authorChun-wei Kuo <Dendoh@gmail.com>2014-07-28 18:21:33 +0800
committerChun-wei Kuo <Dendoh@gmail.com>2014-07-28 18:35:28 +0800
commit524f7b494a758f554d899f11bcbc9827cec6d963 (patch)
tree4f53c06ad33569b517cc79582913d2610a65a4e0 /activemodel/lib/active_model/validator.rb
parentd94a0fe6b849d3424200eaa74f1b23eef9668fa3 (diff)
downloadrails-524f7b494a758f554d899f11bcbc9827cec6d963.tar.gz
rails-524f7b494a758f554d899f11bcbc9827cec6d963.tar.bz2
rails-524f7b494a758f554d899f11bcbc9827cec6d963.zip
Fix example code of `EachValidator` [ci skip]
We have to specify the `:title` option to really use the `TitleValidator` defined above.
Diffstat (limited to 'activemodel/lib/active_model/validator.rb')
-rw-r--r--activemodel/lib/active_model/validator.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb
index 65cb1e5a88..0116de68ab 100644
--- a/activemodel/lib/active_model/validator.rb
+++ b/activemodel/lib/active_model/validator.rb
@@ -79,7 +79,7 @@ module ActiveModel
# include ActiveModel::Validations
# attr_accessor :title
#
- # validates :title, presence: true
+ # validates :title, presence: true, title: true
# end
#
# It can be useful to access the class that is using that validator when there are prerequisites such