Sha256: d43ea55bdae4572b61dd4e1686c2075b948eab2d9520494f6941d83d371dd7c3

Contents?: true

Size: 600 Bytes

Versions: 9

Compression:

Stored size: 600 Bytes

Contents

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

module DocumentNumber
  class InstallGenerator < ::Rails::Generators::Base
    include ::Rails::Generators::Migration

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

    desc 'Generates (but does not run) a migration to add a document numbers table.'

    def create_migration_file
      migration_template 'create_document_numbers.rb', 'db/migrate/create_document_numbers.rb'
    end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
document_number-0.10.0 lib/generators/document_number/install/install_generator.rb
document_number-0.9.6 lib/generators/document_number/install/install_generator.rb
document_number-0.9.5 lib/generators/document_number/install/install_generator.rb
document_number-0.9.4 lib/generators/document_number/install/install_generator.rb
document_number-0.9.3 lib/generators/document_number/install/install_generator.rb
document_number-0.9.2 lib/generators/document_number/install/install_generator.rb
document_number-0.9.1 lib/generators/document_number/install/install_generator.rb
document_number-0.9.0 lib/generators/document_number/install/install_generator.rb
document_number-0.0.1 lib/generators/document_number/install/install_generator.rb