Sha256: 7bfa60a6c4ed272161401a8fa8a9a8a8f6f78fcbaf9b0408c01959be63562d0a

Contents?: true

Size: 756 Bytes

Versions: 1

Compression:

Stored size: 756 Bytes

Contents

require 'rails/generators'
require 'tramway/core/generators/install_generator'

module Tramway::Partner::Generators
  class InstallGenerator < ::Tramway::Core::Generators::InstallGenerator
    include Rails::Generators::Migration
    source_root File.expand_path('../templates', __FILE__)

    def run_other_generators
    end

    def self.next_migration_number(path)
      next_migration_number = current_migration_number(path) + 1
      ActiveRecord::Migration.next_migration_number next_migration_number
    end

    def copy_migrations
      migrations = [
        :create_tramway_partner_organizations
      ]
      migrations.each do |migration|
        migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tramway-partner-0.1.0 lib/tramway/partner/generators/install_generator.rb