change .search to .ransack for updated ransack gem

This commit is contained in:
viehlieb 2023-02-14 12:24:11 +01:00 committed by Philipp Rothmann
parent 5cbe8dd968
commit 808baa5a98
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ class CurrentOrders::ArticlesController < ApplicationController
else
@order_articles = OrderArticle.where(order_id: @current_orders.all.map(&:id))
end
@q = OrderArticle.search(params[:q])
@q = OrderArticle.ransack(params[:q])
@order_articles = @order_articles.ordered.merge(@q.result).includes(:article, :article_price)
@order_article = @order_articles.where(id: params[:id]).first
end