Add not_featured_by
scope to Tag (#28815)
This commit is contained in:
parent
1d3ecd3fba
commit
650c548c31
4 changed files with 23 additions and 6 deletions
|
@ -12,10 +12,6 @@ class Api::V1::FeaturedTags::SuggestionsController < Api::BaseController
|
|||
private
|
||||
|
||||
def set_recently_used_tags
|
||||
@recently_used_tags = Tag.recently_used(current_account).where.not(id: featured_tag_ids).limit(10)
|
||||
end
|
||||
|
||||
def featured_tag_ids
|
||||
current_account.featured_tags.pluck(:tag_id)
|
||||
@recently_used_tags = Tag.suggestions_for_account(current_account).limit(10)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue