Commit d36b022f authored by Jasper Maes's avatar Jasper Maes

Fix deprecation: returning false in Active Record and Active Model callbacks...

Fix deprecation: returning false in Active Record and Active Model callbacks will not implicitly halt a callback chain
parent 5a980865
......@@ -54,6 +54,6 @@ def as_json(options = {})
private
def can_be_destroyed
destroyable?
throw(:abort) unless destroyable?
end
end
---
title: 'Fix deprecation: returning false in Active Record and Active Model callbacks
will not implicitly halt a callback chain'
merge_request: 24134
author: Jasper Maes
type: other
......@@ -22,6 +22,3 @@
# Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = false
# Do not halt callback chains when a callback returns false. Previous versions had true.
ActiveSupport.halt_callback_chains_on_return_false = true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment