mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 01:16:03 +01:00
Eagerly load services in action to prevent n+1 query
This commit is contained in:
parent
da711dcfd4
commit
7d91c0349a
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class InboxController < ApplicationController
|
|||
|
||||
@delete_id = find_delete_id
|
||||
@disabled = true if @inbox.empty?
|
||||
services = current_user.services
|
||||
services = current_user.services.to_a
|
||||
|
||||
respond_to do |format|
|
||||
format.html { render "show", locals: { services: } }
|
||||
|
|
Loading…
Reference in a new issue