1
0
Fork 0
dokkan-data-rails/app/serializers/api/v1/base_serializer.rb

10 lines
235 B
Ruby
Raw Permalink Normal View History

class Api::V1::BaseSerializer < ActiveModel::Serializer
def created_at
object.created_at.in_time_zone.iso8601 if object.created_at
end
def updated_at
object.updated_at.in_time_zone.iso8601 if object.created_at
end
end