From 524f7b494a758f554d899f11bcbc9827cec6d963 Mon Sep 17 00:00:00 2001 From: Chun-wei Kuo Date: Mon, 28 Jul 2014 18:21:33 +0800 Subject: Fix example code of `EachValidator` [ci skip] We have to specify the `:title` option to really use the `TitleValidator` defined above. --- activemodel/lib/active_model/validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel') 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 -- cgit v1.2.3