aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/callbacks.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-02-07 12:13:15 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-02-07 12:19:37 -0300
commit3a25cdca3e0d29ee2040931d0cb6c275d612dffe (patch)
tree1071341bba3fd9f75ca59cb1820ade7322423065 /activesupport/lib/active_support/callbacks.rb
parent64f4930afc2cd9d1a607c38099c3482b420a0512 (diff)
downloadrails-3a25cdca3e0d29ee2040931d0cb6c275d612dffe.tar.gz
rails-3a25cdca3e0d29ee2040931d0cb6c275d612dffe.tar.bz2
rails-3a25cdca3e0d29ee2040931d0cb6c275d612dffe.zip
Remove deprecated behavior that halts callbacks when the return is false
Diffstat (limited to 'activesupport/lib/active_support/callbacks.rb')
-rw-r--r--activesupport/lib/active_support/callbacks.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 9a2be1afc0..2449cb06d8 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -856,30 +856,6 @@ module ActiveSupport
def set_callbacks(name, callbacks) # :nodoc:
self.__callbacks = __callbacks.merge(name.to_sym => callbacks)
end
-
- def deprecated_false_terminator # :nodoc:
- Proc.new do |target, result_lambda|
- terminate = true
- catch(:abort) do
- result = result_lambda.call if result_lambda.is_a?(Proc)
- if Callbacks.halt_and_display_warning_on_return_false && result == false
- display_deprecation_warning_for_false_terminator
- else
- terminate = false
- end
- end
- terminate
- end
- end
-
- private
-
- def display_deprecation_warning_for_false_terminator
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Returning `false` in Active Record and Active Model callbacks will not implicitly halt a callback chain in Rails 5.1.
- To explicitly halt the callback chain, please use `throw :abort` instead.
- MSG
- end
end
end
end