Sha256: efa14043f5a946924d64900afcd62997c75b4727643439b53db07ffc3b923d33

Contents?: true

Size: 387 Bytes

Versions: 1

Compression:

Stored size: 387 Bytes

Contents

class Create<%= plural_class_name %> < ActiveRecord::Migration
  def self.up
    create_table :<%= plural_name %> do |t|
    <%- for attribute in attributes -%>
      t.<%= attribute.type %> :<%= attribute.name %>
    <%- end -%>
    <%- unless options[:skip_timestamps] -%>
      t.timestamps
    <%- end -%>
    end
  end
  
  def self.down
    drop_table :<%= plural_name %>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
humpyard-0.0.1 lib/generators/humpyard/page/templates/migration.rb