UX: Hide "Create Tag" option if user cannot create tag. (#7723)

This commit is contained in:
Dan Ungureanu
2019-08-19 11:40:56 +03:00
committed by GitHub
parent 1a731dcff1
commit 0b1146add4
5 changed files with 54 additions and 22 deletions

View File

@@ -34,7 +34,7 @@ class Site
def categories
@categories ||= begin
categories = Category
.includes(:uploaded_logo, :uploaded_background)
.includes(:uploaded_logo, :uploaded_background, :tags, :tag_groups)
.secured(@guardian)
.joins('LEFT JOIN topics t on t.id = categories.topic_id')
.select('categories.*, t.slug topic_slug')