item price is now saved when added to cart
This commit is contained in:
@@ -12,7 +12,7 @@ class CreateItems < ActiveRecord::Migration
|
||||
t.integer :stock
|
||||
t.boolean :on_display
|
||||
|
||||
t.timestamps null: false
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddPriceToItemInCart < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :item_in_carts, :price, :decimal
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150312073820) do
|
||||
ActiveRecord::Schema.define(version: 20150313065130) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -69,6 +69,7 @@ ActiveRecord::Schema.define(version: 20150312073820) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "count"
|
||||
t.decimal "price"
|
||||
end
|
||||
|
||||
create_table "items", force: :cascade do |t|
|
||||
|
||||
Reference in New Issue
Block a user