Sha256: 0e6cb111196308116e5b1bd7b36b5eaef69796ced2aa6c675a9efed12eb35b90

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

require "rails/generators/active_record"

module Github
  module DS
    module Generators
      class ActiveRecordGenerator < ::Rails::Generators::Base
        include ::Rails::Generators::Migration
        desc "Generates migration for KV table"

        source_paths << File.join(File.dirname(__FILE__), "templates")

        def create_migration_file
          migration_template "migration.rb", "db/migrate/create_key_values_table.rb"
        end

        def self.next_migration_number(dirname)
          ::ActiveRecord::Generators::Base.next_migration_number(dirname)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
github-ds-0.1.0 lib/generators/github/ds/active_record_generator.rb