Class: DataPackage::CollectionSerializer
- Inherits:
-
BaseSerializer
- Object
- BaseSerializer
- DataPackage::CollectionSerializer
- Defined in:
- app/serializers/data_package/collection_serializer.rb
Instance Method Summary collapse
Methods inherited from BaseSerializer
Constructor Details
This class inherits a constructor from DataPackage::BaseSerializer
Instance Method Details
#serialize ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/serializers/data_package/collection_serializer.rb', line 3 def serialize { title: @object.name, path: Rails.application.routes.url_helpers.url_for(@object), caption: @object.caption, description: @object.notes, links: @object.links.map { LinkSerializer.new(it).serialize } }.compact end |