Class: Central::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_migrationsObject



13
14
15
16
17
18
19
# File 'lib/generators/central/install_generator.rb', line 13

def create_migrations
  Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath|
    name = File.basename(filepath)
    migration_template "migrations/#{name}", "db/migrate/#{name}", skip: true
    sleep 1
  end
end