From cdb9d7f481a6b299cd53a0f647397da60d806a21 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Mon, 19 Dec 2016 18:41:09 +0900 Subject: Privatize unneededly protected methods in Active Model --- activemodel/lib/active_model/validations/validates.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activemodel/lib/active_model/validations/validates.rb') diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index f95f44de61..0ce5935f3a 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -148,15 +148,15 @@ module ActiveModel validates(*(attributes << options)) end - protected + private # When creating custom validators, it might be useful to be able to specify # additional default keys. This can be done by overwriting this method. - def _validates_default_keys # :nodoc: + def _validates_default_keys [:if, :unless, :on, :allow_blank, :allow_nil , :strict] end - def _parse_validates_options(options) # :nodoc: + def _parse_validates_options(options) case options when TrueClass {} -- cgit v1.2.3