diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-10 16:33:26 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-10 16:34:13 -0200 |
commit | 3375a093e91dfee7a0e4264cbf746363a7e50f54 (patch) | |
tree | f0db49c30cef2680968d917e7c596247698210ea /actionpack/lib/action_controller/railtie.rb | |
parent | d65b76642637928f64c9aa092e305238eb3b6f4f (diff) | |
download | rails-3375a093e91dfee7a0e4264cbf746363a7e50f54.tar.gz rails-3375a093e91dfee7a0e4264cbf746363a7e50f54.tar.bz2 rails-3375a093e91dfee7a0e4264cbf746363a7e50f54.zip |
Rails initialization with initialize_on_precompile = false should set assets_dir
Diffstat (limited to 'actionpack/lib/action_controller/railtie.rb')
-rw-r--r-- | actionpack/lib/action_controller/railtie.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |