Skip to content

Commit

Permalink
7.1 upgrade: Set add_autoload_paths_to_load_path
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmhaig committed Jan 14, 2025
1 parent d34ec04 commit 3031606
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.0

### 7.1 framework default
# No longer add autoloaded paths into `$LOAD_PATH`. This means that you won't be able
# to manually require files that are managed by the autoloader, which you shouldn't do anyway.
#
# This will reduce the size of the load path, making `require` faster if you don't use bootsnap, or reduce the size
# of the bootsnap cache if you use it.
#
# To set this configuration, add the following line to `config/application.rb` (NOT this file):
config.add_autoload_paths_to_load_path = false

config.middleware.use Rack::Deflater
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/new_framework_defaults_7_1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html

###
### Updated in config/applicatoin.rb
# No longer add autoloaded paths into `$LOAD_PATH`. This means that you won't be able
# to manually require files that are managed by the autoloader, which you shouldn't do anyway.
#
Expand Down
1 change: 0 additions & 1 deletion spec/helpers/claims_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def current_user
describe '#show_message_controls?' do
subject(:subj_show_message_controls?) { show_message_controls?(claim) }

require 'application_helper'
let(:claim) { build(:claim, state:) }

RSpec.configure do |c|
Expand Down

0 comments on commit 3031606

Please sign in to comment.