Sha256: 4755953316d414543c54dafaddcbe29a4c95d4eab41847b7d0e0872d57fb9f81

Contents?: true

Size: 645 Bytes

Versions: 5

Compression:

Stored size: 645 Bytes

Contents

require "rails/generators/migration"
require "rails/generators/active_record"
require "generators/groupify/active_record/next_migration_version"

module Groupify
  module ActiveRecord
    class MigrationGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
      extend NextMigrationVersion

      source_root File.expand_path("../templates", __FILE__)

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
groupify-0.9.0 lib/generators/groupify/active_record/migration/migration_generator.rb
groupify-0.8.0 lib/generators/groupify/active_record/migration/migration_generator.rb
groupify-0.7.2 lib/generators/groupify/active_record/migration/migration_generator.rb
groupify-0.7.1 lib/generators/groupify/active_record/migration/migration_generator.rb
groupify-0.7.0 lib/generators/groupify/active_record/migration/migration_generator.rb