Commit 6a880b3c authored by Pedro Pombeiro's avatar Pedro Pombeiro

Address MR review comments

parent fada2c23
...@@ -24,7 +24,7 @@ module AuditEvents ...@@ -24,7 +24,7 @@ module AuditEvents
details.merge!(entity_id: @token_scope.id, entity_type: @token_scope.class.name) if @token_scope details.merge!(entity_id: @token_scope.id, entity_type: @token_scope.class.name) if @token_scope
safe_author = safe_author(author) safe_author = safe_author(author)
details[token_field] = safe_author if safe_author != author details[token_field] = safe_author if safe_author.is_a?(String)
details[:errors] = @runner.errors.full_messages unless @runner.errors.empty? details[:errors] = @runner.errors.full_messages unless @runner.errors.empty?
...@@ -40,6 +40,10 @@ module AuditEvents ...@@ -40,6 +40,10 @@ module AuditEvents
private private
def token_field
raise NotImplementedError, "Please implement #{self.class}##{__method__}"
end
def message def message
raise NotImplementedError, "Please implement #{self.class}##{__method__}" raise NotImplementedError, "Please implement #{self.class}##{__method__}"
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment