I am adding Facebook authentication using omniauth to my application according to Ryan Bates screencast
There was a problem with the create function in the authentication controller. the create function should handle the facebook callback (which seems nice).
Error in the log file:
NoMethodError method (undefined`authentications' for nil: NilClass)
The error refers to this line in the create function in the authentication controller:
current_user.authentications.find_or_create_by_provider_and_uid (auth ['provider'], auth ['uid'])
What do you think is the problem?
Thanks,
Oded
source share