ソースを参照

测试 before 事件

abiao 5 年 前
コミット
592165a99b
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -10,7 +10,7 @@ class Product < ActiveRecord::Base
     #after_update :after_update
     before_save :before_save
     after_destroy :del_picture
-    before_validation :do_something
+    before_filter :do_something
 
     def do_something
         puts params