Sha256: 040d4564157c5e5a76e51dd5165528f40f556104d3a40d18035cf08b539e9413

Contents?: true

Size: 304 Bytes

Versions: 4

Compression:

Stored size: 304 Bytes

Contents

class Create<%= model_class.pluralize %> < ActiveRecord::Migration
  def self.up
    create_table :<%= table_name %> do |t|
    <%- fields.each do |name, type| -%>
      t.<%= type %> :<%= name %>
    <%- end -%>
    t.timestamps
    end
  end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
humdrum-rails-0.0.7 lib/rails/generators/humdrum/resource/templates/migrations/create_resources.rb
humdrum-rails-0.0.6 lib/rails/generators/humdrum/resource/templates/migrations/create_resources.rb
humdrum-rails-0.0.4 lib/rails/generators/humdrum/resource/templates/migrations/create_resources.rb
humdrum-rails-0.0.3 lib/rails/generators/humdrum/resource/templates/migrations/create_resources.rb