mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
18 lines
No EOL
504 B
Ruby
18 lines
No EOL
504 B
Ruby
class StaffActionLogSerializer < ApplicationSerializer
|
|
attributes :action_name,
|
|
:details,
|
|
:context,
|
|
:ip_address,
|
|
:email,
|
|
:created_at,
|
|
:subject,
|
|
:previous_value,
|
|
:new_value
|
|
|
|
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 |