diff options
author | Chun-wei Kuo <Dendoh@gmail.com> | 2014-07-28 18:21:33 +0800 |
---|---|---|
committer | Chun-wei Kuo <Dendoh@gmail.com> | 2014-07-28 18:35:28 +0800 |
commit | 524f7b494a758f554d899f11bcbc9827cec6d963 (patch) | |
tree | 4f53c06ad33569b517cc79582913d2610a65a4e0 /activemodel/lib | |
parent | d94a0fe6b849d3424200eaa74f1b23eef9668fa3 (diff) | |
download | rails-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')
-rw-r--r-- | activemodel/lib/active_model/validator.rb | 2 |
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 |