Browse files

Merge commit '0592542f7e73550b5f8b55950a2ad0b82923b00b' into HEAD

  • Loading branch information...
2 parents c133bc0 + 0592542 commit ab27595cb7470fdde70f1bd1bdab678327801664 Jenkins committed May 2, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/models/user.rb
View
6 app/models/user.rb
@@ -10,8 +10,12 @@ class User
# Setup accessible (or protected) attributes for your model
attr_accessible :email, :name, :uid, :version
+ def self.find_by_uid(uid)
+ where(uid: uid).first
+ end
+
def self.find_for_gds_oauth(auth_hash)
- where(uid: auth_hash["uid"]).first || create_from_auth_hash(auth_hash)
+ find_by_uid(auth_hash["uid"]) || create_from_auth_hash(auth_hash)
end
def self.create_from_auth_hash(auth_hash)

0 comments on commit ab27595

Please sign in to comment.