Sha256: a26a65ca893e3781fc0ed2d1daf2084063ec342563ba86411ebb875a8edc773e

Contents?: true

Size: 610 Bytes

Versions: 2

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

require 'rails/generators/migration'
require 'rails/generators/active_record'

module Hws
  module Stores
    class InstallGenerator < Rails::Generators::Base # :nodoc:
      include Rails::Generators::Migration

      source_root File.expand_path('templates', __dir__)

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

      desc 'copying migrations to db/migrate'
      def copy_migrations
        migration_template 'migration.rb.erb', 'db/migrate/create_hws_store_tables.rb'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hws-stores-0.1.1 lib/generators/hws/stores/install_generator.rb
hws-stores-0.1.0 lib/generators/hws/stores/install_generator.rb