mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 04:31:56 +08:00
12 lines
246 B
Ruby
12 lines
246 B
Ruby
class EmbeddableHostSerializer < ApplicationSerializer
|
|
|
|
TO_SERIALIZE = [:id, :host, :path_whitelist, :class_name, :category_id]
|
|
|
|
attributes *TO_SERIALIZE
|
|
|
|
TO_SERIALIZE.each do |attr|
|
|
define_method(attr) { object.send(attr) }
|
|
end
|
|
|
|
end
|