abiao 5 роки тому
батько
коміт
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
         #主商品默认关联商品