瀏覽代碼

model add scope

abiao 5 年之前
父節點
當前提交
d4333a7d80
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      app/models/product.rb

+ 1 - 3
app/models/product.rb

@@ -139,9 +139,7 @@ class Product < ActiveRecord::Base
             end
 
             puts strs
-            if strs.length==0
-                scopes [:inactive]
-            end
+
 
             filters [:id,:detail,:status,:name]