diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-26 21:05:50 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-26 21:05:50 +0100 |
commit | 6404feee500dc5a2268da1e41af08a5ff847338a (patch) | |
tree | 0d1cc50909192b51ba3f56ace8a4b1be5865464c /actionpack/lib/action_controller | |
parent | dc57d545bb3e8ff4123892e5e311e658ab506252 (diff) | |
download | rails-6404feee500dc5a2268da1e41af08a5ff847338a.tar.gz rails-6404feee500dc5a2268da1e41af08a5ff847338a.tar.bz2 rails-6404feee500dc5a2268da1e41af08a5ff847338a.zip |
AC railtie should configure helpers path.
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/helpers.rb | 5 | ||||
-rw-r--r-- | actionpack/lib/action_controller/railtie.rb | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index 0ebdf07911..03ba4b3f83 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -50,9 +50,8 @@ module ActionController include AbstractController::Helpers included do - extlib_inheritable_accessor(:helpers_path) do - defined?(Rails::Application) ? Rails::Application.paths.app.helpers.to_a : [] - end + extlib_inheritable_accessor(:helpers_path) + self.helpers_path = [] end module ClassMethods diff --git a/actionpack/lib/action_controller/railtie.rb b/actionpack/lib/action_controller/railtie.rb index 29a0a346ec..9151de4462 100644 --- a/actionpack/lib/action_controller/railtie.rb +++ b/actionpack/lib/action_controller/railtie.rb @@ -21,5 +21,9 @@ module ActionController initializer "action_controller.initialize_framework_caches" do ActionController::Base.cache_store ||= RAILS_CACHE end + + initializer "action_controller.set_helpers_path" do |app| + ActionController::Base.helpers_path = app.config.paths.app.helpers.to_a + end end end |