mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-07 17:36:22 +08:00
9 lines
265 B
Ruby
9 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
|