discourse/app/serializers/staff_action_log_serializer.rb
2013-08-07 16:27:34 -04:00

15 lines
No EOL
426 B
Ruby

class StaffActionLogSerializer < ApplicationSerializer
attributes :action_name,
:details,
:context,
:ip_address,
:email,
:created_at
has_one :staff_user, serializer: BasicUserSerializer, embed: :objects
has_one :target_user, serializer: BasicUserSerializer, embed: :objects
def action_name
StaffActionLog.actions.key(object.action).to_s
end
end