Skip to content

Commit f934172

Browse files
committed
Disable rubocop offences
Commit fdb54e03bb71ffaad17bea562e0ca8d87b081059 resolved the rubocop offences within `def handle_omniauth(scheme)`. However, the created helper methods are now triggering rubocop offences as well. Although, I'm hesitant to simply disable these offences, I also don't want to go overboard with refactoring this file.
1 parent ffdfd56 commit f934172

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/controllers/users/omniauth_callbacks_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def failure
4444

4545
private
4646

47+
# rubocop:disable Metrics/AbcSize
4748
def handle_omniauth_for_signed_in_user(user, scheme)
4849
# If the user could not be found by that uid then attach it to their record
4950
if user.nil?
@@ -69,7 +70,9 @@ def handle_omniauth_for_signed_in_user(user, scheme)
6970
# Redirect to the User Profile page
7071
redirect_to edit_user_registration_path
7172
end
73+
# rubocop:enable Metrics/AbcSize
7274

75+
# rubocop:disable Metrics/AbcSize
7376
def handle_omniauth_for_signed_out_user(user, scheme)
7477
# If the uid didn't have a match in the system send them to register
7578
if user.nil?
@@ -90,5 +93,6 @@ def handle_omniauth_for_signed_out_user(user, scheme)
9093
redirect_to new_user_registration_url
9194
end
9295
end
96+
# rubocop:enable Metrics/AbcSize
9397
end
9498
end

0 commit comments

Comments
 (0)