Sha256: d7044888999e16ef2ddce712166309a803b0f6fc583ff700820b48ee17f583f4

Contents?: true

Size: 369 Bytes

Versions: 4

Compression:

Stored size: 369 Bytes

Contents

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

  desc "Creates a migration"

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
generator-spec-0.5.0 lib/generators/migration/migration_generator.rb
generator-spec-0.4.8 lib/generators/migration/migration_generator.rb
generator-spec-0.4.7 lib/generators/migration/migration_generator.rb
generator-spec-0.4.5 lib/generators/migration/migration_generator.rb