Merge pull request #349 from openSUSE/review_140721_basic_rubocop_rules

[Review] Request from 'KalabiYau' @ 'openSUSE/osem/review_140721_basic_rubocop_rules'
This commit is contained in:
Artem Chernikov 2014-07-23 11:00:30 +02:00
commit d9d72eae07
103 changed files with 686 additions and 260 deletions

View file

@ -13,7 +13,7 @@ module Users
openid = Openid.find_for_oauth(auth_hash) # Get or create openid
# If openid exists and is associated with a user, sign in with associated user,
# even if the email of the associated user and the email of the provided openid are different
unless user = openid.user
unless (user = openid.user)
user = User.find_for_auth(auth_hash, current_user) # Get or create users
end
@ -26,7 +26,7 @@ module Users
sign_in user
redirect_to root_path, notice: user.email + " signed in successfully with #{provider}"
rescue Exception => e
rescue => e
redirect_back_or_to new_user_registration_path, alert: 'Failed' + e.message
end
end