Sha256: af3539e25fc9d2bbb7c34013a399a19f2fc1df81930c468d428c707128f44367

Contents?: true

Size: 357 Bytes

Versions: 2

Compression:

Stored size: 357 Bytes

Contents

require 'rspec_for_generators/migration_helper'

class MigrationGenerator < Rails::Generators::NamedBase 
  include MigrationHelper

  desc "Creates a migration"

  def self.source_root
    @source_root ||= File.expand_path("../templates", __FILE__)
  end
    
  def create_migration
    migration "#{name} name:string age:integer admin:boolean"
  end
end 

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
generator-spec-0.4.0 lib/generators/migration/migration_generator.rb
generator-spec-0.3.5 lib/generators/migration/migration_generator.rb