Sha256: dfdfa96f93da2334c872287024b4f4f6dcde9836f72ec791554b7cdeda2489f9

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

class Create<%= table_name.camelize %> < ActiveRecord::Migration
  def self.up
    create_table(:<%= table_name %>) do |t|
      t.string :ical

<% if attributes %>
<% for attribute in attributes -%>
      t.<%= attribute[:type] %> :<%= attribute[:name] %>
<% end -%>
<% end -%>

      t.timestamps
    end

  end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
actic-0.0.2 lib/generators/actic_calendar/templates/migration.rb.txt
actic-0.0.1 lib/generators/actic_calendar/templates/migration.rb.txt