Class: Munster::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration
Defined in:
lib/munster/install_generator.rb

Overview

Rails generator used for setting up Munster in a Rails application. Run it with bin/rails g munster:install in your console.

Instance Method Summary collapse

Instance Method Details

#copy_filesObject



21
22
23
# File 'lib/munster/install_generator.rb', line 21

def copy_files
  template "munster.rb", File.join("config", "initializers", "munster.rb")
end

#create_migration_fileObject



16
17
18
19
# File 'lib/munster/install_generator.rb', line 16

def create_migration_file
  migration_template "create_munster_tables.rb.erb", File.join(db_migrate_path, "create_munster_tables.rb")
  migration_template "add_headers_to_munster_webhooks.rb.erb", File.join(db_migrate_path, "add_headers_to_munster_webhooks.rb")
end