Class: Rubyblok::Generators::WebhookControllerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Rubyblok::Generators::WebhookControllerGenerator
- Defined in:
- lib/generators/rubyblok/webhook_controller_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_initializer ⇒ Object
13 14 15 |
# File 'lib/generators/rubyblok/webhook_controller_generator.rb', line 13 def copy_initializer template('webhook_controller.rb.erb', "app/controllers/#{file_name}_controller.rb") end |
#routes_config ⇒ Object
17 18 19 20 21 22 |
# File 'lib/generators/rubyblok/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 |