Class: Gouda::InstallGenerator

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

Overview

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

Constant Summary collapse

TEMPLATES =
File.join(File.dirname(__FILE__), "templates/install")

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject

Generates monolithic migration file that contains all database changes.



19
20
21
# File 'lib/generators/gouda/install_generator.rb', line 19

def create_migration_file
  migration_template "migrations/create_gouda_tables.rb.erb", File.join(db_migrate_path, "create_gouda_tables.rb")
end