discourse/app/serializers/watched_word_serializer.rb

10 lines
179 B
Ruby

# frozen_string_literal: true
class WatchedWordSerializer < ApplicationSerializer
attributes :id, :word, :action
def action
WatchedWord.actions[object.action]
end
end