lib/pagseguro/railtie.rb in pagseguro-0.1.2 vs lib/pagseguro/railtie.rb in pagseguro-0.1.3.beta.1

- old
+ new

@@ -4,11 +4,10 @@ require "pagseguro/generator" end initializer :add_routing_paths do |app| if PagSeguro.developer? - require "pagseguro/developer_controller" app.routes_reloader.paths.unshift(File.dirname(__FILE__) + "/routes.rb") end end rake_tasks do @@ -16,8 +15,12 @@ end initializer "pagseguro.initialize" do |app| ::ActionView::Base.send(:include, PagSeguro::Helper) ::ActionController::Base.send(:include, PagSeguro::ActionController) + end + + ::ActiveSupport.on_load(:action_controller) do + require "pagseguro/developer_controller" if PagSeguro.developer? end end end