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
         #主商品默认关联商品