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 /railties/lib/rails/application.rb | |
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
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r-- | railties/lib/rails/application.rb | 7 |
1 files changed, 7 insertions, 0 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 |