Sha256: 9aa8d482b257156688ceb8322009dc554f8104c33b02e9cf6fa290c4073d9ffd
Contents?: true
Size: 283 Bytes
Versions: 1
Compression:
Stored size: 283 Bytes
Contents
class User < ApplicationRecord def self.omniauth auth find_by uid: auth[:uid] || create_from_omniauth(auth) end def self.create_from_omniauth auth create! do |user| uid: auth[:uid] name: auth[:info][:name] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-slooob-1.0.0 | examples/rails_example/app/models/user.rb |