Class: Roomer::Generators::MigrationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Extended by:
ActiveRecord::Generators::Migration
Includes:
Rails::Generators::Migration, Helpers::GeneratorHelper
Defined in:
lib/generators/roomer/migration/migration_generator.rb

Instance Method Summary collapse

Methods included from Helpers::GeneratorHelper

#migration_dir, #model_exists?, #model_path, #shared?

Instance Method Details

#create_migration_fileObject

Generates the migration



18
19
20
21
# File 'lib/generators/roomer/migration/migration_generator.rb', line 18

def create_migration_file
  set_local_assigns!
  migration_template "migration.rb", "#{migration_dir}/roomer_#{file_name}"
end