aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/lib/action_controller/railtie.rb
blob: 6b270d1136c95b009b44aa48f05494ca5d24b26b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                           
               
 
                       
                                

                                  


                                                         










                                                                                  


                                                                  
     
   
require "action_controller"
require "rails"

module ActionController
  class Railtie < Rails::Railtie
    plugin_name :action_controller

    require "action_controller/railties/subscriber"
    subscriber ActionController::Railties::Subscriber.new

    initializer "action_controller.set_configs" do |app|
      app.config.action_controller.each do |k,v|
        ActionController::Base.send "#{k}=", v
      end
    end

    # TODO: ActionController::Base.logger should delegate to its own config.logger
    initializer "action_controller.logger" do
      ActionController::Base.logger ||= Rails.logger
    end

    initializer "action_controller.initialize_framework_caches" do
      ActionController::Base.cache_store ||= RAILS_CACHE
    end
  end
end