Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

rubocop fixes

Jonas Jabari1c776c152e56
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index a6ed85cee34..68c532e24b8 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -101,9 +101,7 @@ class MyController < ApplicationController
def generate_rss_key
token = Token::RSS.create!(user: current_user)
flash[:info] = [
- # rubocop:disable Rails/OutputSafety
t('my.access_token.notice_reset_token', type: 'RSS').html_safe,
- # rubocop:enable Rails/OutputSafety
content_tag(:strong, token.plain_value),
t('my.access_token.token_value_warning')
]
@@ -116,7 +114,7 @@ class MyController < ApplicationController
def revoke_rss_key
current_user.rss_token.destroy
- flash[:info] = t('my.access_token.notice_rss_token_revoked')
+ flash[:info] = t('my.access_token.notice_rss_token_revoked')
rescue StandardError => e
Rails.logger.error "Failed to revoke rss token ##{current_user.id}: #{e}"
flash[:error] = t('my.access_token.failed_to_reset_token', error: e.message)
@@ -128,9 +126,7 @@ class MyController < ApplicationController
def generate_api_key
token = Token::API.create!(user: current_user)
flash[:info] = [
- # rubocop:disable Rails/OutputSafety
t('my.access_token.notice_reset_token', type: 'API').html_safe,
- # rubocop:enable Rails/OutputSafety
content_tag(:strong, token.plain_value),
t('my.access_token.token_value_warning')
]
@@ -143,7 +139,7 @@ class MyController < ApplicationController
def revoke_api_key
current_user.api_token.destroy
- flash[:info] = t('my.access_token.notice_api_token_revoked')
+ flash[:info] = t('my.access_token.notice_api_token_revoked')
rescue StandardError => e
Rails.logger.error "Failed to revoke api token ##{current_user.id}: #{e}"
flash[:error] = t('my.access_token.failed_to_reset_token', error: e.message)