Skip to content
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.

Commit

Permalink
Update SQL query to use equals
Browse files Browse the repository at this point in the history
  • Loading branch information
alsmola committed Dec 3, 2017
1 parent 723d613 commit 0c53f3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/nopassword/login_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def activate_session(code, activating_ip, activating_user_agent)
end

def active_sessions
LoginSession.where("email == :email AND activated == 't' AND terminated == 'f'", { :email => self.email }).order("activated_at DESC")
LoginSession.where("email = :email AND activated = 't' AND terminated = 'f'", { :email => self.email }).order("activated_at DESC")
end

def terminated_sessions
Expand Down

0 comments on commit 0c53f3b

Please sign in to comment.