Sha256: 9f2a311cce755a025be296cfa4795066cc54586ac1c00b529b79710e5e19a880
Contents?: true
Size: 683 Bytes
Versions: 7
Compression:
Stored size: 683 Bytes
Contents
require 'rails/generators' require 'rails/generators/base' module Toro module Generators class InstallGenerator < ::Rails::Generators::Base include ::Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "Install the 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 install_migrations migration_template "create_toro_jobs.rb", "db/migrate/create_toro_jobs.rb" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems