method
default_load_paths
default_load_paths()
private
Hide source
# File railties/lib/initializer.rb, line 448 def default_load_paths paths = ["#{root_path}/test/mocks/#{environment}"] # Then model subdirectories. # TODO: Don't include .rb models as load paths paths.concat(Dir["#{root_path}/app/models/[_a-z]*"]) paths.concat(Dir["#{root_path}/components/[_a-z]*"]) # Followed by the standard includes. # TODO: Don't include dirs for frameworks that are not used paths.concat %w( app app/models app/controllers app/helpers app/services app/apis components config lib vendor vendor/rails/railties vendor/rails/railties/lib vendor/rails/actionpack/lib vendor/rails/activesupport/lib vendor/rails/activerecord/lib vendor/rails/actionmailer/lib vendor/rails/actionwebservice/lib ).map { |dir| "#{root_path}/#{dir}" }.select { |dir| File.directory?(dir) } end