2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-04 08:47:37 +08:00
discourse/app/jobs/regular/rebake_custom_emoji_posts.rb
Guo Xiang Tan 1a7e954e09 FIX: Store custom emojis as uploads.
* Depending on a hardcoded directory was a flawed design
  which made it impossible to debug when custom emojis go
  missing.
2017-03-14 13:07:18 +08:00

8 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