RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: ernbrn
Site: ern-brn.com
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'])
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'])