diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-07-15 14:26:09 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-07-15 14:26:09 -0300 |
commit | 64c1264419f766a306eba0418c1030b87489ea67 (patch) | |
tree | 1aee52a2e2434d2e7eecc67f94683e99823e79d0 /activemodel | |
parent | a0b4dc21a2188a4379bc401b73336608fec56c64 (diff) | |
parent | beb07fbfae845d20323a9863c7216c6b63aff9c7 (diff) | |
download | rails-64c1264419f766a306eba0418c1030b87489ea67.tar.gz rails-64c1264419f766a306eba0418c1030b87489ea67.tar.bz2 rails-64c1264419f766a306eba0418c1030b87489ea67.zip |
Merge pull request #20887 from tgxworld/ar_callbacks
Revert "Revert "Reduce allocations when running AR callbacks.""
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 2 | ||||
-rw-r--r-- | activemodel/lib/active_model/validations/callbacks.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 72094a26c0..5f1dde4aa3 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -404,7 +404,7 @@ module ActiveModel protected def run_validations! #:nodoc: - run_callbacks :validate + _run_validate_callbacks errors.empty? end diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb index b4301c23e4..4b58ef66e3 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_callbacks(:validation) { super } + _run_validation_callbacks { super } end end end |