Sha256: 1511ed01039382e50fb4639fb6ac2d914c820fbb1194ff12237f4e4e9daba76b

Contents?: true

Size: 488 Bytes

Versions: 3

Compression:

Stored size: 488 Bytes

Contents

require 'rails/generators/active_record'

module Translatable
  class MigrationGenerator < ::Rails::Generators::Base
    include Rails::Generators::Migration
    source_root File.expand_path('../templates', __FILE__)

    desc 'Install migration file'
    def install
      migration_template 'migration.rb', 'db/migrate/create_translated_words.rb'
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ar-translatable-0.1.0 lib/generators/translatable/migration_generator.rb
ar-translatable-0.0.2 lib/generators/translatable/migration_generator.rb
ar-translatable-0.0.1 lib/generators/translatable/migration_generator.rb