mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 21:50:24 +08:00
437c9a554b
Find & Replace and Autotag watched words were not completely exported and import did not work with these either. This commit changes the input and output format to CSV, which allows for a secondary column. This change is backwards compatible because a CSV file with only one column has one value per line.
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?
|
|
WatchedWord.has_replacement?(action)
|
|
end
|
|
end
|