Sha256: f50b01046bf0d5acd7a94ad7bc170c10244a768d074ebfdc787a01b9b304541d

Contents?: true

Size: 458 Bytes

Versions: 1

Compression:

Stored size: 458 Bytes

Contents

class Create<%= plural_model_name.delete('::') %> < ActiveRecord::Migration
  def self.up
    create_table :<%= plural_name.split('/').last %> do |t|
    <%- for attribute in attributes -%>
      t.<%= attribute.type %> :<%= attribute.name %>
    <%- end -%>
      t.attachment :picture
    <%- unless options[:skip_timestamps] -%>
      t.timestamps
    <%- end -%>
    end
  end

  def self.down
    drop_table :<%= plural_name.split('/').last %>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adhoc-generators-0.0.5 lib/generators/adhoc/portfolio/templates/migration.rb