Sha256: 4f5b680b4d31a9328b8d64abcf16293d2098058ecad186965176ad84585b2a5b

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 Bytes

Contents

class MigrationGenerator < Templater::Generator

  def self.source_root
    File.join %W| #{File.dirname(__FILE__)} .. .. .. templates migration |
  end

  first_argument :name, :required => true

  directory :migrations, File.join(%w|db migrate|)
  template :migration do |t|
    t.source      = File.join(%w|db migrate migration.rb|)
    t.destination = File.join(%w|db migrate %next_migration_num%_%underscore%.rb|)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
michaelbarton-gigantron-0.1.6 lib/gigantron/generators/migration_generator.rb
michaelbarton-gigantron-0.1.7 lib/gigantron/generators/migration_generator.rb
michaelbarton-gigantron-0.1.8 lib/gigantron/generators/migration_generator.rb