Sha256: 39d60b81530bf0c26b40a9445de0646947b8d246edfb42c51cd8559c873689a3
Contents?: true
Size: 461 Bytes
Versions: 1
Compression:
Stored size: 461 Bytes
Contents
class Create<%= model_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.4 | lib/generators/adhoc/portfolio/templates/migration.rb |