Class: Sincerely::Generators::AwsSesWebhookControllerGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_initializer ⇒ Object



13
14
15
# File 'lib/generators/sincerely/aws_ses_webhook_controller_generator.rb', line 13

def copy_initializer
  template('aws_ses_webhook_controller.rb.erb', "app/controllers/#{file_name}_controller.rb")
end

#routes_config ⇒ Object



17
18
19
20
21
22
# File 'lib/generators/sincerely/aws_ses_webhook_controller_generator.rb', line 17

def routes_config
  destination_path = 'config/routes.rb'
  insert_into_file destination_path, after: 'Rails.application.routes.draw do' do
    routes_content
  end
end