Fix various things in the directory (#9449)
* Fix missing variable in directory page title * Order hashtags by number of people instead of alphabetically * Add icon to OpenGraph preview of directory page * Prevent line breaks in hashtags and ensure lowercase in the table
This commit is contained in:
parent
c1c0f7c516
commit
ecd303c097
3 changed files with 10 additions and 5 deletions
|
@ -20,7 +20,7 @@ class Tag < ApplicationRecord
|
|||
|
||||
validates :name, presence: true, uniqueness: true, format: { with: /\A#{HASHTAG_NAME_RE}\z/i }
|
||||
|
||||
scope :discoverable, -> { joins(:account_tag_stat).where(AccountTagStat.arel_table[:accounts_count].gt(0)).where(account_tag_stats: { hidden: false }).order(name: :asc) }
|
||||
scope :discoverable, -> { joins(:account_tag_stat).where(AccountTagStat.arel_table[:accounts_count].gt(0)).where(account_tag_stats: { hidden: false }).order('account_tag_stats.accounts_count desc') }
|
||||
scope :hidden, -> { where(account_tag_stats: { hidden: true }) }
|
||||
|
||||
delegate :accounts_count,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue