mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:57:36 +08:00
b49b455e47
New topics with be matched against a set of watched words and be tagged accordingly.
14 lines
268 B
Ruby
14 lines
268 B
Ruby
# frozen_string_literal: true
|
|
|
|
class WatchedWordSerializer < ApplicationSerializer
|
|
attributes :id, :word, :replacement, :action
|
|
|
|
def action
|
|
WatchedWord.actions[object.action]
|
|
end
|
|
|
|
def include_replacement?
|
|
action == :replace || action == :tag
|
|
end
|
|
end
|