Prechádzať zdrojové kódy

admin details multple

abiao 4 rokov pred
rodič
commit
c40baef7c6
1 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 4 2
      app/models/order.rb

+ 4 - 2
app/models/order.rb

@@ -11,7 +11,7 @@ class Order < ActiveRecord::Base
 
     has_many :order_details
     has_many :base_details
-    has_and_belongs_to_many :products, join_table: :order_details
+    # has_and_belongs_to_many :products, join_table: :order_details
 
     before_save :before_save
     #after_update :after_update
@@ -129,9 +129,11 @@ class Order < ActiveRecord::Base
     rails_admin do 
         navigation_label '商品管理'
         weight -240
+=begin
         configure :products do
             inverse_of :order_details
         end
+=end
         list do
             scopes [nil,:未支付,:已关闭,:处理中,:待收货,:已完成]
             filters [:order_id,:status,:pay_way,:receive_time,:wx_user_id,:paied_time,:depart]
@@ -332,7 +334,7 @@ class Order < ActiveRecord::Base
             field :order_remark
             field :dispatch_time
             field :depart
-            field :products
+                # field :products
 
          end