chore: rubocop

chore: fix api test conventions

chore: rubocop -A spec/

chore: more rubocop -A

fix failing test

rubocop fixes

removes helper methods that are in my opinion dead code

more rubocop fixes

rubocop -a --auto-gen-config
This commit is contained in:
Philipp Rothmann 2023-05-12 13:01:12 +02:00 committed by Philipp Rothmann
parent f6fb804bbe
commit fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions

View file

@ -5,7 +5,7 @@ class DiscourseLoginController < DiscourseController
def initiate
discourse_url = FoodsoftConfig[:discourse_url]
nonce = SecureRandom.hex()
nonce = SecureRandom.hex
return_sso_url = url_for(action: :callback, only_path: false)
session[:discourse_sso_nonce] = nonce
@ -36,7 +36,7 @@ class DiscourseLoginController < DiscourseController
user.save!
login_and_redirect_to_return_to user, notice: I18n.t('discourse.callback.logged_in')
rescue => error
redirect_to login_url, alert: error.to_s
rescue StandardError => e
redirect_to login_url, alert: e.to_s
end
end