Commit 4bfe8877 by ivan Lan

Fix product_controller

parent a6c808e4
...@@ -9,9 +9,7 @@ module Shotengai ...@@ -9,9 +9,7 @@ module Shotengai
skip_before_action :buyer_auth skip_before_action :buyer_auth
def index_query resources def index_query resources
p params[:catalog_ids] resources.catalog_list_filter(::Catalog.where(id: params[:catalog_ids]))
p ::Catalog.find_by_id(params[:catalog_ids])
resources.catalog_list_filter(::Catalog.find_by_id(params[:catalog_ids]))
end end
end end
end end
......
...@@ -14,7 +14,7 @@ module Shotengai ...@@ -14,7 +14,7 @@ module Shotengai
def index_query resources def index_query resources
resources.catalog_list_filter( resources.catalog_list_filter(
::Catalog.find_by_id(params[:catalog_ids]) ::Catalog.where(id: params[:catalog_ids])
).where( ).where(
params[:status].blank?.! && { status: params[:status] } params[:status].blank?.! && { status: params[:status] }
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment