Sha256: bcddec4f194421dd1159fa5734ccc573053c6db9f777063e188512ecd47ce6c9
Contents?: true
Size: 557 Bytes
Versions: 1
Compression:
Stored size: 557 Bytes
Contents
class Bodegaize<%= product_name.classify.pluralize %> < ActiveRecord::Migration def change add_column :<%= product_name.tableize %>, :price_in_cents, :integer add_column :<%= product_name.tableize %>, :for_sale, :boolean, default: true add_column :<%= product_name.tableize %>, :keep_stock, :boolean, default: false add_column :<%= product_name.tableize %>, :number_in_stock, :integer add_column :<%= product_name.tableize %>, :for_sale_at, :datetime add_column :<%= product_name.tableize %>, :not_for_sale_at, :datetime end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bodega-0.2.0 | lib/generators/bodega/productize/templates/migration.rb |