Class: Questionable::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/questionable.rb

Instance Method Summary collapse

Instance Method Details

#copy_migrationsObject



39
40
41
42
43
44
45
46
47
# File 'lib/questionable.rb', line 39

def copy_migrations
    filename = 'questionable_migration'

    if self.class.migration_exists?('db/migrate', filename)
        say_status('skipped', "Migration #{filename}.rb already exists")
    else
        migration_template "migrations/#{filename}.rb", "db/migrate/#{filename}.rb"
    end
end