Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- app/models/user.rb
Class Attribute Summary collapse
-
.current ⇒ Object
Returns the value of attribute current.
Class Method Summary collapse
Class Attribute Details
.current ⇒ Object
Returns the value of attribute current.
5 6 7 |
# File 'app/models/user.rb', line 5 def current @current end |
Class Method Details
.find_or_create_from_auth_hash(auth_hash) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/user.rb', line 7 def find_or_create_from_auth_hash(auth_hash) user = find_by_id(auth_hash["uid"]) return user if user user = create({ :id => auth_hash["uid"], :name => auth_hash["info"]["name"], :email_address => auth_hash["info"]["email"], }) end |