@@ -10,14 +10,14 @@ class Product < ActiveRecord::Base
after_update :after_update
def after_create
#主商品默认关联商品
- if self.show_flag==1
+ if self.show_flag
self.relate_product_id = self.id
self.save
end
def after_update
#若取消,则用户卡次数加1