mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Import and export watched word (#12444)
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.
This commit is contained in:
@@ -46,6 +46,10 @@ class WatchedWord < ActiveRecord::Base
|
||||
w
|
||||
end
|
||||
|
||||
def self.has_replacement?(action)
|
||||
action == :replace || action == :tag
|
||||
end
|
||||
|
||||
def action_key=(arg)
|
||||
self.action = self.class.actions[arg.to_sym]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user