Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Qpixel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Automate
Agent sessions
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Answers
Qpixel
Commits
31390b73
Commit
31390b73
authored
Jun 26, 2020
by
luap42
Browse files
Options
Downloads
Patches
Plain Diff
This should do it.
parent
c98cfb8d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/warning_template.rb
+6
-6
6 additions, 6 deletions
app/models/warning_template.rb
with
6 additions
and
6 deletions
app/models/warning_template.rb
+
6
−
6
View file @
31390b73
...
...
@@ -6,12 +6,12 @@ class WarningTemplate < ApplicationRecord
def
body_as_b64
body_with_site_replacements
=
body
.
gsub
'$SiteName'
,
SiteSetting
[
'SiteName'
]
body_with_site_replacements
=
if
SiteSetting
[
'ChatLink'
].
nil?
body_with_site_replacements
.
gsub
'$ChatLink'
,
'chat'
chat_link
=
if
SiteSetting
[
'ChatLink'
].
nil?
'chat'
else
chat_link
=
'[chat]('
+
SiteSetting
[
'ChatLink'
]
+
')'
body_with_site_replacements
.
gsub
'$ChatLink'
,
chat_link
'[chat]('
+
SiteSetting
[
'ChatLink'
]
+
')'
end
body_with_site_replacements
=
body_with_site_replacements
.
gsub
'$ChatLink'
,
chat_link
Base64
.
encode64
(
body_with_site_replacements
)
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment