Commit c87770be authored by Robert Speicher's avatar Robert Speicher

Merge branch 'deprecated-callback-false' into 'master'

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

See merge request gitlab-org/gitlab-ce!24134
parents 2ab68a23 d36b022f
...@@ -54,6 +54,6 @@ class List < ActiveRecord::Base ...@@ -54,6 +54,6 @@ class List < ActiveRecord::Base
private private
def can_be_destroyed def can_be_destroyed
destroyable? throw(:abort) unless destroyable?
end end
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 @@ ActiveSupport.to_time_preserves_timezone = false ...@@ -22,6 +22,3 @@ ActiveSupport.to_time_preserves_timezone = false
# Require `belongs_to` associations by default. Previous versions had false. # Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = 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