Sha256: a74352f279c8a613a444ae2c32f08bb7cdc665aed4dd5944a46d3850876e5d82

Contents?: true

Size: 630 Bytes

Versions: 1

Compression:

Stored size: 630 Bytes

Contents

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

module Bites
  module Generators
    class InstallGenerator < ::Rails::Generators::Base

      include Rails::Generators::Migration

      source_root File.expand_path('../templates', __FILE__)
      desc "Add the migrations for Bites"

      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
        migration_template("create_bites.rb", "db/migrate/create_bites.rb")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bites-1.0.0 lib/generators/bites/install/install_generator.rb