diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-29 20:06:49 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-29 20:06:49 -0800 |
commit | cfb2126726f34baedfab971785ad7ff19a7f54ce (patch) | |
tree | 8171e9d68f4b6122ed0f9ae788947710b117ce23 | |
parent | 635e2ccd3ea8da64f9ee046cc9d8580007cff679 (diff) | |
download | rails-cfb2126726f34baedfab971785ad7ff19a7f54ce.tar.gz rails-cfb2126726f34baedfab971785ad7ff19a7f54ce.tar.bz2 rails-cfb2126726f34baedfab971785ad7ff19a7f54ce.zip |
Load app initializers by path relative to Rails.root
-rw-r--r-- | railties/lib/initializer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 8e8bcf21fe..b645ac3da2 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -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 |