Class: PublicActivity::Generators::MigrationUpgradeGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Extended by:
Base
Defined in:
lib/generators/public_activity/migration_upgrade/migration_upgrade_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



14
15
16
# File 'lib/generators/public_activity/migration_upgrade/migration_upgrade_generator.rb', line 14

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