diff options
author | Carl Lerche <carllerche@mac.com> | 2009-10-08 12:30:44 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-10-08 12:31:09 -0700 |
commit | feb04bf897dc3d904379d400f568b80116b18551 (patch) | |
tree | 4fc1fcfc9ce33d6891d2d3e6023fc0c0b5cfbd8a | |
parent | e4d7e5090c928e5b64350be9a1fb3aaf6f968e4c (diff) | |
download | rails-feb04bf897dc3d904379d400f568b80116b18551.tar.gz rails-feb04bf897dc3d904379d400f568b80116b18551.tar.bz2 rails-feb04bf897dc3d904379d400f568b80116b18551.zip |
Move the ensure_tmp_directories_exist initializer to the application object
-rw-r--r-- | railties/lib/rails/application.rb | 7 | ||||
-rw-r--r-- | railties/lib/rails/initializer.rb | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 011a9c489d..c7b92ef9b7 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -98,5 +98,12 @@ module Rails require 'active_support/dependencies' plugin_loader.add_plugin_load_paths end + + # Create tmp directories + initializer :ensure_tmp_directories_exist do + %w(cache pids sessions sockets).each do |dir_to_make| + FileUtils.mkdir_p(File.join(configuration.root_path, 'tmp', dir_to_make)) + end + end end end diff --git a/railties/lib/rails/initializer.rb b/railties/lib/rails/initializer.rb index 4487cacf7a..687455feca 100644 --- a/railties/lib/rails/initializer.rb +++ b/railties/lib/rails/initializer.rb @@ -116,13 +116,6 @@ module Rails end end - # Create tmp directories - Initializer.default.add :ensure_tmp_directories_exist do - %w(cache pids sessions sockets).each do |dir_to_make| - FileUtils.mkdir_p(File.join(configuration.root_path, 'tmp', dir_to_make)) - end - end - # Loads the environment specified by Configuration#environment_path, which # is typically one of development, test, or production. Initializer.default.add :load_environment do |