Skip to content

Commit

Permalink
Fix preloading of orders in admin users controller
Browse files Browse the repository at this point in the history
The has_many relation is called :orders, not :spree_orders
  • Loading branch information
tvdeyen committed Jun 21, 2022
1 parent 0c6ad90 commit 9c70ee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/controllers/spree/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def collection

@search = super.ransack(params[:q])
@collection = @search.result.includes(:spree_roles)
@collection = @collection.includes(:spree_orders)
@collection = @collection.includes(:orders)
@collection = @collection.page(params[:page]).per(Spree::Config[:admin_products_per_page])
end

Expand Down

0 comments on commit 9c70ee2

Please sign in to comment.