support-foo/web

View on GitHub
app/serializers/timestamped_serializer.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'active_support/concern'

module TimestampedSerializer
  extend ActiveSupport::Concern

  included do
    attributes :created, :updated
  end

  def created
    object.created_at.iso8601
  end

  def updated
    object.updated_at.iso8601
  end
end