1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Load app initializers by path relative to Rails.root

This commit is contained in:
Jeremy Kemper 2008-11-29 20:06:49 -08:00
parent 635e2ccd3e
commit cfb2126726

View file

@ -564,7 +564,7 @@ Run `rake gems:install` to install the missing gems.
def load_application_initializers
if gems_dependencies_loaded
Dir["#{configuration.root_path}/config/initializers/**/*.rb"].sort.each do |initializer|
load(initializer)
load initializer.sub(/^#{Regexp.escape(configuration.root_path)}\//, '')
end
end
end