abiao лет назад: 5
Родитель
Сommit
f8e86080dd
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      app/models/product.rb

+ 8 - 0
app/models/product.rb

@@ -10,6 +10,14 @@ class Product < ActiveRecord::Base
     #after_update :after_update
     before_save :before_save
     after_destroy :del_picture
+    after_commit :do_something
+
+    def do_something
+        puts params
+        puts "1233989898989898989898989"
+    end
+
+
 
     def after_create
         #主商品默认关联商品