Ver código fonte

增加商品属性定义

abiao 5 anos atrás
pai
commit
09bfa2f646
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      app/models/product.rb

+ 2 - 1
app/models/product.rb

@@ -5,7 +5,8 @@ class Product < ActiveRecord::Base
     belongs_to :merchant, :foreign_key => :merchant_id
     validates :name,:buy_price,:price,:category_id,:count,:robo_balance_price, presence: true
     attr_accessor :v_share_img,:get_size_enum,:gross_interest_rate,:get_color_enum
-    after_find :get_size_enum,:get_color_enum
+    after_find :get_size_enum
+    after_find :get_color_enum
     TYPE_ENUM = [["直营","direct_sale"]]
     #["代销","user_sale"]
     SIZE_ENUM =  []