lib/pjax_rails.rb in pjax_rails-0.3.4 vs lib/pjax_rails.rb in pjax_rails-0.4.0

- old
+ new

@@ -1,9 +1,11 @@ require 'pjax' module PjaxRails class Engine < ::Rails::Engine - initializer "pjax_rails.add_controller" do - config.to_prepare { ApplicationController.send :include, Pjax } + initializer 'pjax_rails.add_controller' do + ActiveSupport.on_load :action_controller do + ActionController::Base.send :include, Pjax + end end end -end \ No newline at end of file +end