Reduce usage of @current_user (use helper instead)

This commit is contained in:
Sebastian Serth
2022-11-02 12:25:53 +01:00
parent a4e791e3de
commit 4f0b8c3c42
8 changed files with 22 additions and 21 deletions

View File

@ -26,13 +26,13 @@ html lang="#{I18n.locale || I18n.default_locale}"
| release: "#{SentryJavascript.release}",
| environment: "#{SentryJavascript.environment}",
| });
- if @current_user
- if current_user
| Sentry.configureScope(function(scope) {
| scope.setUser({
| "id": "#{@current_user.id}",
| "type": "#{@current_user.class.name}",
| "username": "#{@current_user.displayname}",
| "consumer": "#{@current_user.consumer.name}"
| "id": "#{current_user.id}",
| "type": "#{current_user.class.name}",
| "username": "#{current_user.displayname}",
| "consumer": "#{current_user.consumer.name}"
| });
| });
body