diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 22 |
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 |