0
0
Fork 0

Add featured tag add/remove activity handler (#19408)

This commit is contained in:
Takeshi Umeda 2022-10-22 18:49:41 +09:00 committed by GitHub
parent 7c152acb2c
commit 1d34eff63f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 2 deletions

View file

@ -22,6 +22,8 @@ class FeaturedTag < ApplicationRecord
before_create :set_tag
before_create :reset_data
scope :by_name, ->(name) { joins(:tag).where(tag: { name: HashtagNormalizer.new.normalize(name) }) }
delegate :display_name, to: :tag
attr_writer :name