diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 37585b8c4699205e23f0c72a363b8788eddaaeac..2fb7f29d73755d42e2a36f9a22ed941134896b18 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,4 +1,4 @@ -* Deprecate `.halt_and_display_warning_on_return_false`. +* Deprecate `.halt_callback_chains_on_return_false`. *Rafael Mendonça França* diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index 267fa755c6e7b7c055636e4eefdde79ed00d2593..03e3ce821a1b2d5058683300d0b4c5c46a0656fd 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -80,11 +80,15 @@ def self.eager_load! cattr_accessor :test_order # :nodoc: def self.halt_callback_chains_on_return_false - Callbacks.halt_and_display_warning_on_return_false + ActiveSupport::Deprecation.warn(<<-MSG.squish) + ActiveSupport.halt_callback_chains_on_return_false is deprecated and will be removed in Rails 5.2. + MSG end def self.halt_callback_chains_on_return_false=(value) - Callbacks.halt_and_display_warning_on_return_false = value + ActiveSupport::Deprecation.warn(<<-MSG.squish) + ActiveSupport.halt_callback_chains_on_return_false= is deprecated and will be removed in Rails 5.2. + MSG end def self.to_time_preserves_timezone diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index 480291c346c180815b8d6c1b5fcfc2a9f22e49d0..0bee35135b376aeabfc87d6b45e9ac248337faf9 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -69,19 +69,6 @@ module Callbacks CALLBACK_FILTER_TYPES = [:before, :after, :around] - def self.halt_and_display_warning_on_return_false=(value) - - ActiveSupport::Deprecation.warn(<<-MSG.squish) - .halt_and_display_warning_on_return_false= is deprecated and will be removed in Rails 5.2. - MSG - end - - def self.halt_and_display_warning_on_return_false - ActiveSupport::Deprecation.warn(<<-MSG.squish) - .halt_and_display_warning_on_return_false is deprecated and will be removed in Rails 5.2. - MSG - end - # Runs the callbacks for the given event. # # Calls the before and around callbacks in the order they were set, yields