Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Erin Brown's Profile

GitHub User: ernbrn

Site: ern-brn.com

Comments by Erin Brown

Avatar

Just in case anyone is getting a undefined method error for find_or_create_by_provider_and_uid in Rails 4, this code works:

current_user.authentications.find_or_create_by(:provider => auth['provider'],
:uid => auth['uid'])