diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-12-07 16:37:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-07 16:37:32 +0100 |
commit | ecd303c097bf20aa971628ba8420a9f17f3dd1f7 (patch) | |
tree | 170630fe0763c27b687f75f02892956f2eecc32b /app/models | |
parent | c1c0f7c5161452ded4373e6aa1cc9f852f8836c1 (diff) |
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
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/tag.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/tag.rb b/app/models/tag.rb index b28e2cc18..41e58e3ca 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -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, |