Просмотр исходного кода

商品规格 关联增加限制条件

abiao лет назад: 5
Родитель
Сommit
7b26bdf9b6
1 измененных файлов с 0 добавлено и 4 удалено
  1. 0 4
      app/models/product_attr_config.rb

+ 0 - 4
app/models/product_attr_config.rb

@@ -2,7 +2,6 @@ class ProductAttrConfig < ActiveRecord::Base
     has_paper_trail
     self.table_name = 'product_attr_configs'
     belongs_to :product_attr_key, :foreign_key => :attr_key_id
-    belongs_to :product,[{@product.show_flag=>1}]
     validates :size_type,:product_id,:product_attr_key,presence:true
     attr_accessor :show_products
 
@@ -54,14 +53,11 @@ class ProductAttrConfig < ActiveRecord::Base
         end
 
         edit do
-=begin
             field :product_id, :enum do
                 enum do
                   PRODUCT_ENUM
                 end
             end
-=end
-            field :product
             field :product_attr_key
             field :size_type, :enum do
                 enum do