Module: Login::Provider::Association

Defined in:
app/models/login/provider.rb

Instance Method Summary collapse

Instance Method Details

#find_or_create(auth) ⇒ Object



7
8
9
10
# File 'app/models/login/provider.rb', line 7

def find_or_create auth
  provider = where(provider:auth.provider, uid:auth.uid).first
  provider ||= create!(provider:auth.provider, uid:auth.uid)
end