Class: Tramway::Api::V1::ApplicationSerializer
- Inherits:
-
ActiveModel::Serializer
- Object
- ActiveModel::Serializer
- Tramway::Api::V1::ApplicationSerializer
- Includes:
- Core::Concerns::AttributesDecoratorHelper
- Defined in:
- app/serializers/tramway/api/v1/application_serializer.rb
Instance Method Summary collapse
Instance Method Details
#created_at ⇒ Object
13 14 15 |
# File 'app/serializers/tramway/api/v1/application_serializer.rb', line 13 def created_at object.created_at.iso8601 end |
#id ⇒ Object
8 9 10 11 |
# File 'app/serializers/tramway/api/v1/application_serializer.rb', line 8 def id id_method = Tramway::Api.id_method_of(model: object.class) || :uuid object.send(id_method) end |
#updated_at ⇒ Object
17 18 19 |
# File 'app/serializers/tramway/api/v1/application_serializer.rb', line 17 def updated_at object.updated_at.iso8601 end |