提交 feb04bf8 编写于 作者: C Carl Lerche

Move the ensure_tmp_directories_exist initializer to the application object

上级 e4d7e509
......@@ -98,5 +98,12 @@ def new
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
......@@ -116,13 +116,6 @@ def self.run(initializer = nil, config = nil)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册