aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-02-08 17:24:49 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-02-08 17:24:49 +0900
commit70e8fed5a36484ea602c318be74079b58dc543d0 (patch)
tree9c6ecd05cb4201495be33a352181f467c49833b5
parent4e63ce53fc25c3bc15c5ebf54bab54fa847ee02a (diff)
downloadrails-70e8fed5a36484ea602c318be74079b58dc543d0.tar.gz
rails-70e8fed5a36484ea602c318be74079b58dc543d0.tar.bz2
rails-70e8fed5a36484ea602c318be74079b58dc543d0.zip
remove `ActiveSupport.halt_callback_chains_on_return_false` from everywhere
-rw-r--r--activejob/test/helper.rb1
-rw-r--r--guides/source/configuring.md2
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt3
-rw-r--r--railties/test/generators/app_generator_test.rb1
4 files changed, 0 insertions, 7 deletions
diff --git a/activejob/test/helper.rb b/activejob/test/helper.rb
index 776f7788de..db07ecab7a 100644
--- a/activejob/test/helper.rb
+++ b/activejob/test/helper.rb
@@ -1,7 +1,6 @@
require "active_job"
require "support/job_buffer"
-ActiveSupport.halt_callback_chains_on_return_false = false
GlobalID.app = "aj"
@adapter = ENV["AJ_ADAPTER"] || "inline"
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index baa1efe0d3..bd82035408 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -626,8 +626,6 @@ There are a few configuration options available in Active Support:
* `config.active_support.time_precision` sets the precision of JSON encoded time values. Defaults to `3`.
-* `ActiveSupport.halt_callback_chains_on_return_false` specifies whether Active Record and Active Model callback chains can be halted by returning `false` in a 'before' callback. When set to `false`, callback chains are halted only when explicitly done so with `throw(:abort)`. When set to `true`, callback chains are halted when a callback returns `false` (the previous behavior before Rails 5) and a deprecation warning is given. Defaults to `true` during the deprecation period. New Rails 5 apps generate an initializer file called `new_framework_defaults.rb` which sets the value to `false`. This file is *not* added when running `rails app:update`, so returning `false` will still work on older apps ported to Rails 5 and display a deprecation warning to prompt users to update their code.
-
* `ActiveSupport::Logger.silencer` is set to `false` to disable the ability to silence logging in a block. The default is `true`.
* `ActiveSupport::Cache::Store.logger` specifies the logger to use within cache store operations.
diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt
index 3ad3eba98a..bd844f0503 100644
--- a/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt
+++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults.rb.tt
@@ -24,9 +24,6 @@ ActiveSupport.to_time_preserves_timezone = <%= options[:update] ? false : true %
# Require `belongs_to` associations by default. Previous versions had false.
Rails.application.config.active_record.belongs_to_required_by_default = <%= options[:update] ? false : true %>
<%- end -%>
-
-# Do not halt callback chains when a callback returns false. Previous versions had true.
-ActiveSupport.halt_callback_chains_on_return_false = <%= options[:update] ? true : false %>
<%- unless options[:update] -%>
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index e80c253ec9..ce29d93d6e 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -208,7 +208,6 @@ class AppGeneratorTest < Rails::Generators::TestCase
quietly { generator.send(:update_config_files) }
assert_file "#{app_root}/config/initializers/new_framework_defaults.rb" do |content|
- assert_match(/ActiveSupport\.halt_callback_chains_on_return_false = true/, content)
assert_match(/Rails\.application\.config.active_record\.belongs_to_required_by_default = false/, content)
assert_no_match(/Rails\.application\.config\.ssl_options/, content)
end