class TheGardener::Generators::InstallGenerator

Public Class Methods

next_migration_number(path) click to toggle source
# File lib/generators/the_gardener/install/install_generator.rb, line 10
def self.next_migration_number(path)
  unless @prev_migration_nr
    @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
  else
    @prev_migration_nr += 1
  end
  @prev_migration_nr.to_s
end

Public Instance Methods

copy_migrations() click to toggle source
# File lib/generators/the_gardener/install/install_generator.rb, line 19
def copy_migrations
  migration_template "create_the_gardener_seed_migrations.rb", "db/migrate/create_the_gardener_seed_migrations.rb"
  puts "done.\nnow you have to run the db:migrate task to update your database"
end