mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
14 lines
243 B
Ruby
14 lines
243 B
Ruby
class WatchedWordListSerializer < ApplicationSerializer
|
|
attributes :actions, :words
|
|
|
|
def actions
|
|
WatchedWord.actions.keys
|
|
end
|
|
|
|
def words
|
|
object.map do |word|
|
|
WatchedWordSerializer.new(word, root: false)
|
|
end
|
|
end
|
|
end
|