Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- lib/generators/apit/templates/user.rb
Class Method Summary collapse
Class Method Details
.create_with_omniauth(auth) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/generators/apit/templates/user.rb', line 2 def self.create_with_omniauth(auth) create! do |user| user.provider = auth["provider"] user.uid = auth["uid"] user.name = auth["user_info"]["name"] end end |