class TkhAuthentication::Generators::CreateOrUpdateMigrationsGenerator
Public Class Methods
next_migration_number(path)
click to toggle source
# File lib/generators/tkh_authentication/create_or_update_migrations/create_or_update_migrations_generator.rb, line 9 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/tkh_authentication/create_or_update_migrations/create_or_update_migrations_generator.rb, line 18 def copy_migrations puts 'creating user migration' migration_template "create_users.rb", "db/migrate/create_users.rb" migration_template "add_other_name_to_users.rb", "db/migrate/add_other_name_to_users.rb" migration_template "add_email_validation_to_users.rb", "db/migrate/add_email_validation_to_users.rb" migration_template "add_password_creation_token.rb", "db/migrate/add_password_creation_token.rb" end