Sha256: b7f41477d9f04a38b4baa97452ef4588eae59079dec2f04f010e99b16b6336c4
Contents?: true
Size: 1.02 KB
Versions: 13
Compression:
Stored size: 1.02 KB
Contents
require 'rails/generators/migration' module TkhAuthentication module Generators class CreateOrUpdateMigrationsGenerator < ::Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "add the migrations and locale files" 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 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 end end end
Version data entries
13 entries across 13 versions & 1 rubygems