Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- lib/rails/generators/google_oauth_calendar/install/templates/user.rb
Class Method Summary collapse
Class Method Details
.create_with_omniauth(auth) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rails/generators/google_oauth_calendar/install/templates/user.rb', line 5 def self.create_with_omniauth(auth) create! do |user| user.provider = auth['provider'] user.uid = auth['uid'] if auth['info'] user.name = auth['info']['name'] || "" user.email = auth['info']['email'] || "" end end end |