2015-08-18 17:15:46 -04:00
|
|
|
class EmbeddableHostSerializer < ApplicationSerializer
|
|
|
|
|
2017-05-05 18:08:18 -04:00
|
|
|
TO_SERIALIZE = [:id, :host, :path_whitelist, :class_name, :category_id]
|
2015-08-18 17:15:46 -04:00
|
|
|
|
2016-08-23 14:55:52 -04:00
|
|
|
attributes *TO_SERIALIZE
|
2015-08-18 17:15:46 -04:00
|
|
|
|
2016-08-23 14:55:52 -04:00
|
|
|
TO_SERIALIZE.each do |attr|
|
|
|
|
define_method(attr) { object.send(attr) }
|
2015-08-18 17:15:46 -04:00
|
|
|
end
|
|
|
|
|
2016-08-23 14:55:52 -04:00
|
|
|
end
|