mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
AC railtie should configure helpers path.
This commit is contained in:
parent
dc57d545bb
commit
6404feee50
3 changed files with 9 additions and 6 deletions
|
@ -50,9 +50,8 @@ module ActionController
|
||||||
include AbstractController::Helpers
|
include AbstractController::Helpers
|
||||||
|
|
||||||
included do
|
included do
|
||||||
extlib_inheritable_accessor(:helpers_path) do
|
extlib_inheritable_accessor(:helpers_path)
|
||||||
defined?(Rails::Application) ? Rails::Application.paths.app.helpers.to_a : []
|
self.helpers_path = []
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
|
|
|
@ -21,5 +21,9 @@ module ActionController
|
||||||
initializer "action_controller.initialize_framework_caches" do
|
initializer "action_controller.initialize_framework_caches" do
|
||||||
ActionController::Base.cache_store ||= RAILS_CACHE
|
ActionController::Base.cache_store ||= RAILS_CACHE
|
||||||
end
|
end
|
||||||
|
|
||||||
|
initializer "action_controller.set_helpers_path" do |app|
|
||||||
|
ActionController::Base.helpers_path = app.config.paths.app.helpers.to_a
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,13 +7,13 @@ module ActiveSupport
|
||||||
|
|
||||||
# Loads support for "whiny nil" (noisy warnings when methods are invoked
|
# Loads support for "whiny nil" (noisy warnings when methods are invoked
|
||||||
# on +nil+ values) if Configuration#whiny_nils is true.
|
# 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
|
require 'active_support/whiny_nil' if app.config.whiny_nils
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sets the default value for Time.zone
|
# Sets the default value for Time.zone
|
||||||
# If assigned value cannot be matched to a TimeZone, an exception will be raised.
|
# 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'
|
require 'active_support/core_ext/time/zones'
|
||||||
zone_default = Time.__send__(:get_zone, app.config.time_zone)
|
zone_default = Time.__send__(:get_zone, app.config.time_zone)
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ module I18n
|
||||||
config.i18n.engines_load_path = []
|
config.i18n.engines_load_path = []
|
||||||
config.i18n.load_path = []
|
config.i18n.load_path = []
|
||||||
|
|
||||||
initializer :initialize_i18n do
|
initializer "i18n.initialize" do
|
||||||
require 'active_support/i18n'
|
require 'active_support/i18n'
|
||||||
|
|
||||||
ActionDispatch::Callbacks.to_prepare do
|
ActionDispatch::Callbacks.to_prepare do
|
||||||
|
|
Loading…
Reference in a new issue