Class: AuthorizeNet::Generators::DirectPostGenerator

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

Instance Method Summary collapse

Instance Method Details

#manifestObject



36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/generators/authorize_net/direct_post/direct_post_generator.rb', line 36

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 "receipt.erb", "app/views/#{file_name}/receipt.erb"
  copy_file "relay_response.erb", "app/views/#{file_name}/relay_response.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}/receipt', :to => '#{file_name}#receipt', :as => '#{singular_name}_receipt', :via => [:get]"
  route "match '/#{plural_name}/relay_response', :to => '#{file_name}#relay_response', :as => '#{singular_name}_relay_response', :via => [:post]"
  route "match '/#{plural_name}/payment', :to => '#{file_name}#payment', :as => '#{singular_name}payment', :via => [:get]"
end