Class: PayFu::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Extended by:
Generators::Utils::ClassMethods
Includes:
Generators::Utils::InstanceMethods, Rails::Generators::Migration
Defined in:
lib/generators/pay_fu/install_generator.rb

Instance Method Summary collapse

Methods included from Generators::Utils::ClassMethods

next_migration_number

Methods included from Generators::Utils::InstanceMethods

#ask_for, #display

Instance Method Details

#installObject



12
13
14
15
16
17
# File 'lib/generators/pay_fu/install_generator.rb', line 12

def install
  migration_template 'migration.rb', 'db/migrate/create_pay_fu_transactions.rb' rescue display $!.message
  route("mount PayFu::Engine => '/pay_fu', :as => 'pay_fu'")
  template "config.yml", "config/pay_fu.yml"
  display "PayFu engine is installed."
end