Przeglądaj źródła

增加商品属性定义

abiao 5 lat temu
rodzic
commit
14e8d3de1a
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -5,7 +5,7 @@ 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
-    before_update :gross_interest_rate
+    after_find :gross_interest_rate
 
     TYPE_ENUM = [["直营","direct_sale"]]
     #["代销","user_sale"]