Browse files

Remove stupid if/else

  • Loading branch information...
1 parent 246917b commit 13561ecc8887830e0fbe0a9e00fd1dc2e8623e95 @meanphil committed Jul 4, 2012
Showing with 5 additions and 10 deletions.
  1. +5 −10 lib/omniauth-amember_pro/amember_api_wrapper.rb
View
15 lib/omniauth-amember_pro/amember_api_wrapper.rb
@@ -13,16 +13,11 @@ def initialize(options)
end
def login!(username, password)
- result = perform_request('check-access/by-login-pass', {
- login: username,
- pass: password
- })
- if result["ok"] == true
- @username = username
- true
- else
- false
- end
+ result = perform_request('check-access/by-login-pass', { login: username, pass: password })
+
+ @username = username if result["ok"]
+
+ result["ok"]
end
def user_info

0 comments on commit 13561ec

Please sign in to comment.