Skip to content

Commit e9ab225

Browse files
committed
Perf: Fix N+1 in kits#index
1 parent a20fe8e commit e9ab225

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/kits_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class KitsController < ApplicationController
22
def index
3-
@kits = current_organization.kits.includes(line_items: :item).class_filter(filter_params)
3+
@kits = current_organization.kits.includes(:item, line_items: :item).class_filter(filter_params)
44
@inventory = View::Inventory.new(current_organization.id)
55
unless params[:include_inactive_items]
66
@kits = @kits.active

0 commit comments

Comments
 (0)