Sha256: 0569bd67275f46d2696ee7dc552f667a72484c68dc7d397123c90833b8644d1d

Contents?: true

Size: 329 Bytes

Versions: 2

Compression:

Stored size: 329 Bytes

Contents

module Landable
  class AuditSerializer < ActiveModel::Serializer
    attributes :id, :flags, :notes, :approver
    attributes :auditable_type, :auditable_id, :created_at

    def auditable_type
      return unless object.auditable_type.present?
      object.auditable_type.underscore.gsub(%r{^landable\/}, '')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
landable-1.14.0 app/serializers/landable/audit_serializer.rb
landable-1.13.2 app/serializers/landable/audit_serializer.rb