Skip to content

Commit

Permalink
[backend] Added eager loading for variant + product to stock movement…
Browse files Browse the repository at this point in the history
…s/index
  • Loading branch information
radar committed Oct 14, 2013
1 parent e932508 commit 8236b35
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ class StockMovementsController < Spree::Admin::BaseController
helper_method :stock_location

def index
@stock_movements = stock_location.stock_movements.recent.page(params[:page])
@stock_movements = stock_location.stock_movements.recent.
includes(:stock_item => { :variant => :product }).
page(params[:page])
end

def new
Expand Down

0 comments on commit 8236b35

Please sign in to comment.