Sha256: 9359e0b290b4eb666f6bd6074a2efd10eb1945f98a11ac464d93279181302e0c
Contents?: true
Size: 461 Bytes
Versions: 1
Compression:
Stored size: 461 Bytes
Contents
class Create<%= class_name.pluralize.delete('::') %> < ActiveRecord::Migration def self.up create_table :<%= table_name || plural_name.split('/').last %> do |t| <%- for attribute in attributes -%> 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
adhoc-generators-0.0.3 | lib/generators/adhoc/portfolio/templates/migration.rb |