Sha256: 699fb6b03e7759d3243f9c4bc3a7da59c6958af54883f186c5a43586237d4508
Contents?: true
Size: 697 Bytes
Versions: 41
Compression:
Stored size: 697 Bytes
Contents
require 'rails/generators/migration' module MagicAddresses module Generators class UpdateGenerator < ::Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "add magic_addresses update migrations" 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 migration_template( "update_address_migration.rb", "db/migrate/update_magic_addresses.rb" ) end end end end
Version data entries
41 entries across 41 versions & 1 rubygems