From bdc1d329d4eea823d07cf010064bd19c07099ff3 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Sun, 22 Mar 2015 10:43:34 +0800 Subject: Revert "Reduce allocations when running AR callbacks." This reverts commit 796cab45561fce268aa74e6587cdb9cae3bb243e. --- activemodel/lib/active_model/validations.rb | 2 +- activemodel/lib/active_model/validations/callbacks.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel/lib') 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 -- cgit v1.2.3