Sha256: 66166a7122d62cd79b64cccd9e00c739b8397d5313721bfa6e5cabd9ed852277

Contents?: true

Size: 618 Bytes

Versions: 1

Compression:

Stored size: 618 Bytes

Contents

# frozen_string_literal: true

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

module Hws
  module Resources
    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_resources_tables.rb'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hws-resources-0.1.0 lib/generators/hws/resources/install_generator.rb