mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 22:29:46 +08:00
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
|