Fix query in HomeController::ordergroup

This commit is contained in:
Patrick Gansterer 2020-02-25 00:37:17 +01:00
parent 526ea51eac
commit ab912877c3

View file

@ -46,7 +46,7 @@ class HomeController < ApplicationController
end
@financial_transactions = @ordergroup.financial_transactions.visible.page(params[:page]).per(@per_page).order(sort)
@financial_transactions = @financial_transactions.where("note LIKE ?", "%#{params[:query]}%") if params[:query].present?
@financial_transactions = @financial_transactions.where('financial_transactions.note LIKE ?', "%#{params[:query]}%") if params[:query].present?
else
redirect_to root_path, alert: I18n.t('home.no_ordergroups')