From 3375a093e91dfee7a0e4264cbf746363a7e50f54 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 10 Jan 2012 16:33:26 -0200 Subject: Rails initialization with initialize_on_precompile = false should set assets_dir --- actionpack/lib/action_controller/railtie.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/railtie.rb') diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index 7af256fd99..fb810c41b1 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -17,11 +17,14 @@ module ActionController ActiveSupport.on_load(:action_controller) { self.cache_store ||= RAILS_CACHE } end + initializer "action_controller.assets_config", :group => :all do |app| + app.config.action_controller.assets_dir ||= app.config.paths["public"].first + end + initializer "action_controller.set_configs" do |app| paths = app.config.paths options = app.config.action_controller - options.assets_dir ||= paths["public"].first options.javascripts_dir ||= paths["public/javascripts"].first options.stylesheets_dir ||= paths["public/stylesheets"].first options.page_cache_directory ||= paths["public"].first -- cgit v1.2.3