Class: EmbeddableHostSerializer

Inherits:
ApplicationSerializer show all
Defined in:
app/serializers/embeddable_host_serializer.rb

Constant Summary collapse

TO_SERIALIZE =
%i[id host allowed_paths class_name category_id tags user]

Instance Method Summary collapse

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#tagsObject



14
15
16
# File 'app/serializers/embeddable_host_serializer.rb', line 14

def tags
  object.tags.map(&:name)
end

#userObject



10
11
12
# File 'app/serializers/embeddable_host_serializer.rb', line 10

def user
  object.user&.username
end