We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9565e23 commit a13e20aCopy full SHA for a13e20a
lib/rails/concerns/railtie.rb
@@ -2,9 +2,9 @@ module Rails
2
module Concerns
3
class Railtie < Rails::Railtie
4
initializer "concerns.autoload", before: :set_autoload_paths do |app|
5
- concerns_root = File.dirname __FILE__
6
- app.config.autoload_paths << File.join(concerns_root, "models")
7
- app.config.autoload_paths << File.join(concerns_root, "mailers")
+ models_path = File.join File.dirname(__FILE__), "models"
+ mailers_path = File.join File.dirname(__FILE__), "mailers"
+ app.config.autoload_paths += [models_path, mailers_path]
8
end
9
10
0 commit comments