discourse/app/jobs/regular/rebake_custom_emoji_posts.rb

9 lines
198 B
Ruby

module Jobs
class RebakeCustomEmojiPosts < Jobs::Base
def execute(args)
name = args[:name]
Post.where("raw LIKE '%:#{name}:%'").find_each { |post| post.rebake! }
end
end
end