FIX: only show edit reason when the user action is an EDIT
This commit is contained in:
parent
2c19d8a136
commit
90eb6e6b8f
|
@ -66,7 +66,12 @@ class UserActionSerializer < ApplicationSerializer
|
|||
object.post_type == Post.types[:moderator_action]
|
||||
end
|
||||
|
||||
def edit_reason
|
||||
object.edit_reason if object.action_type == UserAction::EDIT
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def avatar_for(email, use_uploaded_avatar, uploaded_avatar_template, uploaded_avatar_id)
|
||||
# NOTE: id is required for cases where the template is blank (during initial population)
|
||||
User.new(
|
||||
|
|
Loading…
Reference in New Issue