Fix query in HomeController::ordergroup
This commit is contained in:
parent
526ea51eac
commit
ab912877c3
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ class HomeController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
@financial_transactions = @ordergroup.financial_transactions.visible.page(params[:page]).per(@per_page).order(sort)
|
@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
|
else
|
||||||
redirect_to root_path, alert: I18n.t('home.no_ordergroups')
|
redirect_to root_path, alert: I18n.t('home.no_ordergroups')
|
||||||
|
|
Loading…
Reference in a new issue