From e09419f22a98266be029c5121b7302ab439c0a3a Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 8 Jan 2024 05:17:38 -0500 Subject: [PATCH] Move old framework defaults file to regular config value (#28623) --- config/initializers/new_framework_defaults_7_0.rb | 10 ---------- config/initializers/open_redirects.rb | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 config/initializers/new_framework_defaults_7_0.rb create mode 100644 config/initializers/open_redirects.rb diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb deleted file mode 100644 index edaf819447..0000000000 --- a/config/initializers/new_framework_defaults_7_0.rb +++ /dev/null @@ -1,10 +0,0 @@ -# frozen_string_literal: true - -# TODO -# The Rails 7.0 framework default here is to set this true. However, we have a -# location in devise that redirects where we don't have an easy ability to -# override a method or set a config option, but where the redirect does not -# provide this option. -# https://github.com/heartcombo/devise/blob/v4.9.2/app/controllers/devise/confirmations_controller.rb#L28 -# Once a solution is found, this line can be removed. -Rails.application.config.action_controller.raise_on_open_redirects = false diff --git a/config/initializers/open_redirects.rb b/config/initializers/open_redirects.rb new file mode 100644 index 0000000000..c953a990c6 --- /dev/null +++ b/config/initializers/open_redirects.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +# TODO +# Starting with Rails 7.0, the framework default here is to set this true. +# However, we have a location in devise that redirects where we don't have an +# easy ability to override the method or set a config option, and where the +# redirect does not supply this option itself. +# https://github.com/heartcombo/devise/blob/v4.9.2/app/controllers/devise/confirmations_controller.rb#L28 +# Once a solution is found, this line can be removed. +Rails.application.config.action_controller.raise_on_open_redirects = false