浏览代码

model add scope

abiao 5 年之前
父节点
当前提交
d958c01867
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -127,7 +127,7 @@ class Product < ActiveRecord::Base
         weight -240
 
         list do
-            puts current_admin_user.id
+            puts self.current_admin_user.id
             scopes [:inactive]
 
             filters [:id,:detail,:status,:name]