Sha256: f1997523bc276bcf595c7aed32a04b1ecec6c4d36f71104dc9b54cafe2b2ae65
Contents?: true
Size: 471 Bytes
Versions: 5
Compression:
Stored size: 471 Bytes
Contents
class Create<%= class_name.pluralize.delete('::') %> < ActiveRecord::Migration def self.up create_table :<%= table_name || plural_name.split('/').last %> do |t| <%- model_attributes.each do |attribute| -%> t.<%= attribute.type %> :<%= attribute.name %> <%- end -%> <%- unless options[:skip_timestamps] -%> t.timestamps <%- end -%> end end def self.down drop_table :<%= table_name || plural_name.split('/').last %> end end
Version data entries
5 entries across 5 versions & 1 rubygems