Sha256: 88f5a250ed4467e8a5f3f2af413abfd6b0fd36279f6177d1b5cf32ffff0ebecb
Contents?: true
Size: 476 Bytes
Versions: 4
Compression:
Stored size: 476 Bytes
Contents
class Create<%= class_name.pluralize.delete('::') %> < ActiveRecord::Migration def self.up create_table :<%= class_name.pluralize.underscore.gsub('/','_') %> do |t| <%- for attribute in model_attributes -%> t.<%= attribute.type %> :<%= attribute.name %> <%- end -%> <%- unless options[:skip_timestamps] -%> t.timestamps <%- end -%> end end def self.down drop_table :<%= class_name.pluralize.underscore.gsub('/','_') %> end end
Version data entries
4 entries across 4 versions & 1 rubygems