ソースを参照

model search filter

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

+ 1 - 1
app/models/product.rb

@@ -126,7 +126,7 @@ class Product < ActiveRecord::Base
         weight -240
 
         list do
-            Product = Product.where("id = ?", 1).first
+            scopes [:ptype, "direct_sale"]
 
             filters [:id,:detail,:status,:name]