Removed article from includes in as it does not work with acts_as_paranoid.
See also https://github.com/goncalossilva/rails3_acts_as_paranoid/issues/62. Better we remove acts_as_paranoid and filter manually?
This commit is contained in:
parent
6196bdae41
commit
c4376f35bf
1 changed files with 1 additions and 2 deletions
|
@ -21,10 +21,9 @@ class Finance::BalancingController < Finance::BaseController
|
|||
sort = "id"
|
||||
end
|
||||
|
||||
@articles = @order.order_articles.ordered.includes(:order, :article, :article_price,
|
||||
@articles = @order.order_articles.ordered.includes(:order, :article_price,
|
||||
group_order_articles: {group_order: :ordergroup}).order(sort)
|
||||
|
||||
|
||||
if params[:sort] == "order_number"
|
||||
@articles = @articles.to_a.sort { |a,b| a.article.order_number.gsub(/[^[:digit:]]/, "").to_i <=> b.article.order_number.gsub(/[^[:digit:]]/, "").to_i }
|
||||
elsif params[:sort] == "order_number_reverse"
|
||||
|
|
Loading…
Reference in a new issue