Class: TrustPayRails::Generators::RoutesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/trust_pay_rails/routes_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_controllerObject



13
14
15
# File 'lib/generators/trust_pay_rails/routes_generator.rb', line 13

def generate_controller
  copy_file "trust_pay_controller.rb", "app/controllers/trust_pay_controller.rb"
end

#generate_routesObject



6
7
8
9
10
11
# File 'lib/generators/trust_pay_rails/routes_generator.rb', line 6

def generate_routes
  route "get '/trust_pay/notification' => 'trust_pay#notification', as: :trust_pay_notification"
  route "get '/trust_pay/return' => 'trust_pay#return', as: :trust_pay_return"
  route "get '/trust_pay/cancel' => 'trust_pay#cancel', as: :trust_pay_cancel"
  route "get '/trust_pay/error' => 'trust_pay#error', as: :trust_pay_error"
end