Class: Paymob::Generators::ControllerGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_initializer_fileObject



10
11
12
13
14
15
16
17
# File 'lib/generators/paymob/controller_generator.rb', line 10

def create_initializer_file
  destination_path = if mount_path.present?
                       "app/controllers/#{mount_path}/paymob_controller.rb"
                     else
                       'app/controllers/paymob_controller.rb'
                     end
  copy_file('paymob_controller.rb', destination_path)
end