Class: ActionHooks::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/action_hooks/install/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



13
14
15
# File 'lib/generators/action_hooks/install/install_generator.rb', line 13

def self.next_migration_number(dirname)
  ::ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#create_initializer_fileObject



21
22
23
# File 'lib/generators/action_hooks/install/install_generator.rb', line 21

def create_initializer_file
  template "action_hooks.rb", "config/initializers/action_hooks.rb"
end

#create_migration_fileObject



17
18
19
# File 'lib/generators/action_hooks/install/install_generator.rb', line 17

def create_migration_file
  migration_template "create_webhook_requests.rb.erb", "db/migrate/create_webhook_requests.rb"
end