Class: AuthorizeNet::Generators::SimGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/authorize_net/sim_generator.rb

Instance Method Summary collapse

Instance Method Details

#manifestObject



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/generators/authorize_net/sim_generator.rb', line 32

def manifest
  copy_file "README-AuthorizeNet", "README-AuthorizeNet"
  empty_directory "app/views/#{file_name}"
  copy_file "payment.rails3.erb", "app/views/#{file_name}/payment.erb"
  copy_file "thank_you.erb", "app/views/#{file_name}/thank_you.erb"
  copy_file "layout.erb", "app/views/layouts/authorize_net.erb"
  template "config.yml.rails3.erb", "config/authorize_net.yml"
  copy_file "initializer.rb", "config/initializers/authorize_net.rb"
  template "controller.rb.erb", "app/controllers/#{file_name}_controller.rb"
  route "match '/#{plural_name}/thank_you', :to => '#{file_name}#thank_you', :as => '#{singular_name}_thank_you', :via => [:get]"
  route "match '/#{plural_name}/payment', :to => '#{file_name}#payment', :as => '#{singular_name}payment', :via => [:get]"
end