Use role caching for Rolify to avoid N+1 queries
Resolves #2018 See https://github.com/RolifyCommunity/rolify#cached-roles-to-avoid-n1-issue
This commit is contained in:
parent
30ba7b133b
commit
98defe2d0f
13 changed files with 44 additions and 35 deletions
|
|
@ -73,7 +73,7 @@
|
|||
method: :patch, class: 'btn btn-mini btn-success', id: "resubmit_track_request_#{track.id}"
|
||||
- if can? :edit, track
|
||||
= link_to 'Edit', edit_conference_program_track_path(@conference.short_title, track), class: 'btn btn-default'
|
||||
- if current_user.has_role? :track_organizer, track
|
||||
- if current_user.has_cached_role? :track_organizer, track
|
||||
= link_to 'Manage', admin_conference_program_track_path(@conference.short_title, track), class: 'btn btn-default'
|
||||
|
||||
.row
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue