1
0
Fork 0
forked from gitea/nas

Order emoji categories (in admin interface) by name (#33630)

This commit is contained in:
Jonathan de Jong 2025-01-22 09:31:51 +01:00 committed by GitHub
parent 3dcf5e12b1
commit e380e803a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -14,4 +14,6 @@ class CustomEmojiCategory < ApplicationRecord
has_many :emojis, class_name: 'CustomEmoji', foreign_key: 'category_id', inverse_of: :category, dependent: nil
validates :name, presence: true, uniqueness: true
scope :alphabetic, -> { order(name: :asc) }
end