Skip to content

Commit

Permalink
Removed article from includes in as it does not work with acts_as_par…
Browse files Browse the repository at this point in the history
…anoid.

See also goncalossilva/acts_as_paranoid#62.
Better we remove acts_as_paranoid and filter manually?
  • Loading branch information
bennibu committed Mar 12, 2013
1 parent 6196bda commit c4376f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/controllers/finance/balancing_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ def new
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"
Expand Down

0 comments on commit c4376f3

Please sign in to comment.