Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-30 21:09:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-30 21:09:39 +0300
commit1b26aaa633642ea33f1fb9d7e8680892c8ca795d (patch)
tree2f472efc1b86f43857082132ed58e2b24e46ab39 /app/models/audit_event.rb
parente65a1b9830b8746fefd18744a39d559cbf58c99e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/audit_event.rb')
-rw-r--r--app/models/audit_event.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/audit_event.rb b/app/models/audit_event.rb
index 6d46009fa4d..e7cfa30a892 100644
--- a/app/models/audit_event.rb
+++ b/app/models/audit_event.rb
@@ -58,6 +58,12 @@ class AuditEvent < ApplicationRecord
end
end
+ def as_json(options = {})
+ super(options).tap do |json|
+ json['ip_address'] = self.ip_address.to_s
+ end
+ end
+
private
def default_author_value