Skip to content

Commit

Permalink
add includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyranja committed Jul 24, 2024
1 parent a9d3a97 commit 7b24d5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/interactor/search_profiles_by_category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def profiles_for_category(category)
Profile.with_attached_image
.is_published
.by_region(context.region)
.includes(:translations)
.includes(:topics)
.where(tags: { name: tag_names })

end
end
1 change: 1 addition & 0 deletions app/interactor/search_profiles_by_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def call
def profiles_with_tags(tags)
Profile.is_published
.by_region(context.current_region)
.includes([:translations])
.has_tags(tags)
end
end

0 comments on commit 7b24d5d

Please sign in to comment.