change .search to .ransack for updated ransack gem
This commit is contained in:
parent
d78abef560
commit
2e17282f59
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ class Finance::FinancialTransactionsController < ApplicationController
|
||||||
sort = "created_on DESC"
|
sort = "created_on DESC"
|
||||||
end
|
end
|
||||||
|
|
||||||
@q = FinancialTransaction.search(params[:q])
|
@q = FinancialTransaction.ransack(params[:q])
|
||||||
@financial_transactions_all = @q.result(distinct: true).includes(:user).order(sort)
|
@financial_transactions_all = @q.result(distinct: true).includes(:user).order(sort)
|
||||||
@financial_transactions_all = @financial_transactions_all.visible unless params[:show_hidden]
|
@financial_transactions_all = @financial_transactions_all.visible unless params[:show_hidden]
|
||||||
@financial_transactions_all = @financial_transactions_all.where(ordergroup_id: @ordergroup.id) if @ordergroup
|
@financial_transactions_all = @financial_transactions_all.where(ordergroup_id: @ordergroup.id) if @ordergroup
|
||||||
|
|
|
@ -32,7 +32,7 @@ class CurrentOrders::ArticlesController < ApplicationController
|
||||||
else
|
else
|
||||||
@order_articles = OrderArticle.where(order_id: @current_orders.all.map(&:id))
|
@order_articles = OrderArticle.where(order_id: @current_orders.all.map(&:id))
|
||||||
end
|
end
|
||||||
@q = OrderArticle.search(params[:q])
|
@q = OrderArticle.ransack(params[:q])
|
||||||
@order_articles = @order_articles.ordered.merge(@q.result).includes(:article, :article_price)
|
@order_articles = @order_articles.ordered.merge(@q.result).includes(:article, :article_price)
|
||||||
@order_article = @order_articles.where(id: params[:id]).first
|
@order_article = @order_articles.where(id: params[:id]).first
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue