2015-08-18 17:15:46 -04:00
|
|
|
class EmbeddableHostSerializer < ApplicationSerializer
|
|
|
|
|
2016-08-23 14:55:52 -04:00
|
|
|
TO_SERIALIZE = [:id, :host, :path_whitelist, :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
|