Explorar el Código

model search filter

abiao hace 5 años
padre
commit
5269dfd249
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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]