diff --git a/app/controllers/concerns/model_filters.rb b/app/controllers/concerns/model_filters.rb index e0ebfb5dc..3097b3a7d 100644 --- a/app/controllers/concerns/model_filters.rb +++ b/app/controllers/concerns/model_filters.rb @@ -15,7 +15,7 @@ def generate_tag_list(models = nil, filter_tags = nil) # Ignore any tags that have been applied as filters tags = all_tags = tags.where.not(id: filter_tags) if filter_tags # Generate a list of tags shared by the list of models - tags = tags.includes(:taggings).where("taggings.taggable": models) if models + tags = tags.includes(:taggings).where("taggings.taggable": models.map(&:id)) if models # Apply tag sorting tags = case current_user.tag_cloud_settings["sorting"] when "alphabetical"