Skip to content

Commit

Permalink
Adjust code for core performance improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWalkingLeek committed Feb 19, 2024
1 parent becae48 commit 163f301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/decorators/jubla/person_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ module Jubla::PersonDecorator
extend ActiveSupport::Concern

def active_roles_grouped
build_memo(roles.includes(:group).without_alumnus)
@active_roles_grouped ||= build_memo(Role.where(id: roles.map(&:id)).without_alumnus)
end

def inactive_roles_grouped
build_memo(roles.includes(:group).alumnus_members)
@inactive_roles_grouped ||= build_memo(Role.where(id: roles.map(&:id)).includes(:group).alumnus_members)
end

def coached_events
Expand Down

0 comments on commit 163f301

Please sign in to comment.