suite
This commit is contained in:
parent
3f87692a69
commit
5238a52533
@ -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
|
||||
|
@ -1,4 +1,5 @@
|
||||
class ProductOrder < ActiveRecord::Base
|
||||
belongs_to :reseaux
|
||||
|
||||
has_many :payments, :as => :element
|
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
class AddReseauxIdToProductOrders < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :product_orders, :reseaux_id, :integer
|
||||
end
|
||||
end
|
@ -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|
|
||||
|
Loading…
x
Reference in New Issue
Block a user