Sha256: 68fe23c03603bcee504db3efd8f884162f09438b637dbbf41424d10dd14249e3

Contents?: true

Size: 289 Bytes

Versions: 3

Compression:

Stored size: 289 Bytes

Contents

class <%= migration_name %> < ActiveRecord::Migration
  def self.up
    create_table :<%= table_name %> do |t|
<% for attribute in attributes -%>
      t.<%= attribute[:type] %> :<%= attribute[:name] %>
<% end -%>
    end
  end

  def self.down
    drop_table :<%= table_name %>
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newplugin-0.0.3 generators/model/templates/migration.rb
newplugin-0.0.2 generators/model/templates/migration.rb
newplugin-0.0.1 generators/model/templates/migration.rb