discourse/plugins/automation/app/serializers/discourse_automation/trigger_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
268 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module DiscourseAutomation
class TriggerSerializer < ApplicationSerializer
attributes :id, :name, :metadata
def metadata
((options[:trigger_metadata] || {}).stringify_keys).merge(object.metadata || {})
end
end
end