mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 04:34:13 -06:00
e0d9232259
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
14 lines
283 B
Ruby
14 lines
283 B
Ruby
# frozen_string_literal: true
|
|
|
|
class EmbeddableHostSerializer < ApplicationSerializer
|
|
|
|
TO_SERIALIZE = [:id, :host, :allowed_paths, :class_name, :category_id]
|
|
|
|
attributes *TO_SERIALIZE
|
|
|
|
TO_SERIALIZE.each do |attr|
|
|
define_method(attr) { object.public_send(attr) }
|
|
end
|
|
|
|
end
|