Sha256: e1b8e039318f0415eafc037b454b6b903f446fb38508206eb03b23965143b2ac
Contents?: true
Size: 720 Bytes
Versions: 3
Compression:
Stored size: 720 Bytes
Contents
require 'rails/generators/migration' module TkhIllustrations module Generators class InstallGenerator < ::Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "add the migration" 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 illustration migration' migration_template "create_illustrations.rb", "db/migrate/create_illustrations.rb" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems