Prechádzať zdrojové kódy

增加商品属性定义

abiao 5 rokov pred
rodič
commit
14e8d3de1a
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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"]