This repository has been archived on 2023-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
osr-discourse-src/app/serializers/embeddable_host_serializer.rb
T
2023-01-09 14:14:59 +00:00

10 lines
265 B
Ruby

# frozen_string_literal: true
class EmbeddableHostSerializer < ApplicationSerializer
TO_SERIALIZE = %i[id host allowed_paths class_name category_id]
attributes *TO_SERIALIZE
TO_SERIALIZE.each { |attr| define_method(attr) { object.public_send(attr) } }
end