Skip to content

Commit

Permalink
Updated Person.cached_authors_in_genre method to filter records by au…
Browse files Browse the repository at this point in the history
…thor role
  • Loading branch information
damisul committed May 15, 2024
1 parent 5f26504 commit 4c8f4a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def cached_authors_in_genre
Rails.cache.fetch('au_by_genre', expires_in: 24.hours) do # memoize
totals = Person.has_toc
.joins(involved_authorities: :work)
.merge(InvolvedAuthority.role_author)
.group(:genre)
.distinct
.count
Expand Down

0 comments on commit 4c8f4a2

Please sign in to comment.