Class: WiserTrails::Generators::MigrationGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Extended by:
Base
Defined in:
lib/generators/wiser_trails/migration/migration_generator.rb

Overview

Migration generator that creates migration file from template

Instance Method Summary collapse

Methods included from Base

source_root

Instance Method Details

#generate_filesObject

Create migration in project’s folder



12
13
14
# File 'lib/generators/wiser_trails/migration/migration_generator.rb', line 12

def generate_files
  migration_template 'migration.rb', "db/migrate/#{name}"
end