1
0
Fork 0
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:
José Valim 2010-01-26 21:05:50 +01:00
parent dc57d545bb
commit 6404feee50
3 changed files with 9 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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