Avoid N+1 SQL queries with CanCanCan accessibility checks
This commit is contained in:
parent
f154c1838c
commit
b36a49a6cd
6 changed files with 14 additions and 12 deletions
|
|
@ -25,7 +25,7 @@
|
|||
.text
|
||||
= screenshot.caption
|
||||
// Has the unmoderated screenshot been uploaded by the current user?
|
||||
- if current_user.screenshots.include?(screenshot)
|
||||
- if current_user && current_user.screenshots.include?(screenshot)
|
||||
.text
|
||||
span.label.secondary
|
||||
' Uploaded by you
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue