Sha256: 2a4cbcf2905972d2b173979664451830880a08890b2a46b481e4a0a15982d25c
Contents?: true
Size: 732 Bytes
Versions: 11
Compression:
Stored size: 732 Bytes
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" end end end end
Version data entries
11 entries across 11 versions & 1 rubygems