This commit is contained in:
Nicolas Bally 2018-03-25 23:36:03 +02:00
parent 3f87692a69
commit 5238a52533
4 changed files with 14 additions and 1 deletions

View File

@ -17,6 +17,12 @@ class Public::ProductOrdersController < ApplicationController
def my_cart
get_reseaux
if !@product_order.reseaux
@product_order.reseaux = @reseaux
@product_order.save
end
end
def vourcher

View File

@ -1,4 +1,5 @@
class ProductOrder < ActiveRecord::Base
belongs_to :reseaux
has_many :payments, :as => :element

View File

@ -0,0 +1,5 @@
class AddReseauxIdToProductOrders < ActiveRecord::Migration
def change
add_column :product_orders, :reseaux_id, :integer
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180301225428) do
ActiveRecord::Schema.define(version: 20180325210006) do
create_table "abonnements", force: :cascade do |t|
t.integer "abonnement_type_id", limit: 4
@ -899,6 +899,7 @@ ActiveRecord::Schema.define(version: 20180301225428) do
t.integer "bl_index", limit: 4
t.integer "bl_year", limit: 4
t.boolean "shiped", limit: 1
t.integer "reseaux_id", limit: 4
end
create_table "product_product_sizes", force: :cascade do |t|