summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 08:17:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 08:17:02 +0000
commitb39512ed755239198a9c294b6a45e65c05900235 (patch)
treed234a3efade1de67c46b9e5a38ce813627726aa7 /app/helpers/application_helper.rb
parentd31474cf3b17ece37939d20082b07f6657cc79a9 (diff)
downloadgitlab-ce-b39512ed755239198a9c294b6a45e65c05900235.tar.gz
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb22
1 files changed, 16 insertions, 6 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index d2cc50be509..a75c1b16145 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -19,23 +19,23 @@ module ApplicationHelper
def dispensable_render(...)
render(...)
- rescue StandardError => error
+ rescue StandardError => e
if Feature.enabled?(:dispensable_render)
- Gitlab::ErrorTracking.track_and_raise_for_dev_exception(error)
+ Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e)
nil
else
- raise error
+ raise e
end
end
def dispensable_render_if_exists(...)
render_if_exists(...)
- rescue StandardError => error
+ rescue StandardError => e
if Feature.enabled?(:dispensable_render)
- Gitlab::ErrorTracking.track_and_raise_for_dev_exception(error)
+ Gitlab::ErrorTracking.track_and_raise_for_dev_exception(e)
nil
else
- raise error
+ raise e
end
end
@@ -223,6 +223,16 @@ module ApplicationHelper
ApplicationHelper.promo_host
end
+ # This needs to be used outside of Rails
+ def self.community_forum
+ 'https://forum.gitlab.com'
+ end
+
+ # Convenient method for Rails helper
+ def community_forum
+ ApplicationHelper.community_forum
+ end
+
def promo_url
'https://' + promo_host
end