Add batch actions and categories to admin UI for custom emojis (#11793)
This commit is contained in:
parent
14d4a783cd
commit
1110ea1a91
11 changed files with 281 additions and 176 deletions
|
@ -59,6 +59,12 @@ class CustomEmoji < ApplicationRecord
|
|||
:emoji
|
||||
end
|
||||
|
||||
def copy!
|
||||
copy = self.class.find_or_initialize_by(domain: nil, shortcode: shortcode)
|
||||
copy.image = image
|
||||
copy.save!
|
||||
end
|
||||
|
||||
class << self
|
||||
def from_text(text, domain)
|
||||
return [] if text.blank?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue