diff options
-rw-r--r-- | actionpack/lib/action_controller/metal/helpers.rb | 5 | ||||
-rw-r--r-- | actionpack/lib/action_controller/railtie.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/railtie.rb | 6 |
3 files changed, 9 insertions, 6 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 diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index a80fa77e1e..c8d8b85000 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -7,13 +7,13 @@ module ActiveSupport # Loads support for "whiny nil" (noisy warnings when methods are invoked # on +nil+ values) if Configuration#whiny_nils is true. - initializer :initialize_whiny_nils do |app| + initializer "active_support.initialize_whiny_nils" do |app| require 'active_support/whiny_nil' if app.config.whiny_nils end # Sets the default value for Time.zone # If assigned value cannot be matched to a TimeZone, an exception will be raised. - initializer :initialize_time_zone do |app| + initializer "active_support.initialize_time_zone" do |app| require 'active_support/core_ext/time/zones' zone_default = Time.__send__(:get_zone, app.config.time_zone) @@ -36,7 +36,7 @@ module I18n config.i18n.engines_load_path = [] config.i18n.load_path = [] - initializer :initialize_i18n do + initializer "i18n.initialize" do require 'active_support/i18n' ActionDispatch::Callbacks.to_prepare do |