mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-31 04:52:12 +02: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
|
@delete_id = find_delete_id
|
||||||
@disabled = true if @inbox.empty?
|
@disabled = true if @inbox.empty?
|
||||||
services = current_user.services
|
services = current_user.services.to_a
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render "show", locals: { services: } }
|
format.html { render "show", locals: { services: } }
|
||||||
|
|
Loading…
Reference in a new issue