Преглед на файлове

增加商品属性定义

abiao преди 5 години
родител
ревизия
09bfa2f646
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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 =  []