Sha256: 7933db175c144cf467fc1fde52d70f48d0e1b719314193a8695d8740c4622d9b

Contents?: true

Size: 752 Bytes

Versions: 6

Compression:

Stored size: 752 Bytes

Contents

module PagSeguro
  class Railtie < Rails::Railtie
    generators do
      require "pagseguro/generator"
    end

    initializer :add_routing_paths do |app|
      if PagSeguro.developer?
        app.routes_reloader.paths.unshift(File.dirname(__FILE__) + "/routes.rb")
      end
    end

    rake_tasks do
      load File.dirname(__FILE__) + "/../tasks/pagseguro.rake"
    end

    initializer "pagseguro.initialize" do |app|
      ::ActionView::Base.send(:include, PagSeguro::Helper)
      ::ActionController::Base.send(:include, PagSeguro::ActionController)

      app.paths.app.views << File.dirname(__FILE__) + "/views"
    end

    config.after_initialize do
      require "pagseguro/developer_controller" if PagSeguro.developer?
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pagseguro-0.1.12 lib/pagseguro/railtie.rb
pagseguro-0.1.11 lib/pagseguro/railtie.rb
pagseguro-0.1.11.beta2 lib/pagseguro/railtie.rb
pagseguro-0.1.11.beta1 lib/pagseguro/railtie.rb
pagseguro-0.1.10 lib/pagseguro/railtie.rb
pagseguro-0.1.10.beta.0 lib/pagseguro/railtie.rb