Skip to content

Commit

Permalink
revert addition to require middleware in rails helper
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeheft committed Jul 8, 2024
1 parent 107aaa0 commit d59ed58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Application < Rails::Application
config.autoload_lib(ignore: %w(assets tasks))
config.autoload_paths << Rails.root.join('lib')
config.autoload_paths += %W(#{config.root}/lib)
Dir[Rails.root.join('app', 'middleware', '*.{rb}')].each { |file| require file }

config.middleware.use Middleware::ErrorHandler

# Configuration for the application, engines, and railties goes here.
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= "test"
Dir[Rails.root.join("app/middleware/*.{rb}")].each { |file| require file }

require_relative "../config/environment"
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
Expand Down

0 comments on commit d59ed58

Please sign in to comment.