Use boolean comparators where it makes sense
This commit is contained in:
parent
dbdc7ae4aa
commit
118886344a
28 changed files with 60 additions and 60 deletions
|
|
@ -160,7 +160,7 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def self.authenticate(login, password)
|
||||
user = (find_by_nick(login) or find_by_email(login))
|
||||
user = find_by_nick(login) || find_by_email(login)
|
||||
if user && user.has_password(password)
|
||||
user
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue