discourse/app/serializers/embeddable_host_serializer.rb

12 lines
253 B
Ruby
Raw Normal View History

class EmbeddableHostSerializer < ApplicationSerializer
TO_SERIALIZE = [:id, :host, :path_whitelist, :class_name, :category_id]
attributes *TO_SERIALIZE
TO_SERIALIZE.each do |attr|
2019-05-07 09:27:05 +08:00
define_method(attr) { object.public_send(attr) }
end
end