Module: VelirIdentityEngine::User::ClassMethods
- Defined in:
- lib/velir_identity_engine/user.rb
Instance Method Summary collapse
- #approved_users ⇒ Object
-
#create_with_omniauth(auth) ⇒ User
Creates a valid record given an OmniAuth hash.
- #unapproved_users ⇒ Object
Instance Method Details
#approved_users ⇒ Object
40 |
# File 'lib/velir_identity_engine/user.rb', line 40 def approved_users ; where(:approved => true) end |
#create_with_omniauth(auth) ⇒ User
Creates a valid record given an OmniAuth hash.
30 31 32 33 34 35 36 37 38 |
# File 'lib/velir_identity_engine/user.rb', line 30 def create_with_omniauth(auth) user = self.new user.provider = auth["provider"] user.uid = auth["uid"] user.first_name = auth["user_info"]["name"].split(" ")[0] user.last_name = auth["user_info"]["name"].split(" ")[1] user.save! user end |
#unapproved_users ⇒ Object
41 |
# File 'lib/velir_identity_engine/user.rb', line 41 def unapproved_users ; where(:approved => false) end |