Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
Migrated to Rails Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
willian committed Nov 10, 2011
1 parent b6c3fd5 commit 554452e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/pagseguro.rb
Expand Up @@ -4,6 +4,7 @@
require "bigdecimal"

require "pagseguro/base"
require "pagseguro/engine"
require "pagseguro/faker"
require "pagseguro/rake"
require "pagseguro/railtie"
Expand Down
4 changes: 4 additions & 0 deletions lib/pagseguro/engine.rb
@@ -0,0 +1,4 @@
module PagSeguro #:nodoc:
class Engine < ::Rails::Engine #:nodoc:
end
end
2 changes: 1 addition & 1 deletion lib/pagseguro/helper.rb
@@ -1,6 +1,6 @@
module PagSeguro::Helper
def pagseguro_form(order, options = {})
options.reverse_merge!(:submit => "Pagar com PagSeguro")
render :partial => "/pagseguro_form", :locals => {:options => options, :order => order}
render :partial => "pagseguro/pagseguro_form", :locals => {:options => options, :order => order}
end
end
2 changes: 0 additions & 2 deletions lib/pagseguro/railtie.rb
Expand Up @@ -17,8 +17,6 @@ class Railtie < Rails::Railtie
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
Expand Down

0 comments on commit 554452e

Please sign in to comment.