diff options
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations/callbacks.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations/length.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 176d4c0607..74d60327d6 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -401,7 +401,7 @@ module ActiveModel protected def run_validations! #:nodoc: - _run_validate_callbacks + run_callbacks :validate errors.empty? end diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb index 4b58ef66e3..b4301c23e4 100644 --- a/activemodel/lib/active_model/validations/callbacks.rb +++ b/activemodel/lib/active_model/validations/callbacks.rb @@ -109,7 +109,7 @@ module ActiveModel # Overwrite run validations to include callbacks. def run_validations! #:nodoc: - _run_validation_callbacks { super } + run_callbacks(:validation) { super } end end end diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb index 060919fac3..c22a58f9e1 100644 --- a/activemodel/lib/active_model/validations/length.rb +++ b/activemodel/lib/active_model/validations/length.rb @@ -23,7 +23,7 @@ module ActiveModel if options[:tokenizer] ActiveSupport::Deprecation.warn(<<-EOS.strip_heredoc) The `:tokenizer` option is deprecated, and will be removed in Rails 5.1. - You can achieve the same functionality be defining an instance method + You can achieve the same functionality by defining an instance method with the value that you want to validate the length of. For example, validates_length_of :essay, minimum: 100, |