I am adding Facebook authentication with omniauth to my application according to Ryan Bates screencast
There is a problem with the create function in the authentication controller. the create function should handle the facebook callback (which seems to be fine).
The error in the log file is:
NoMethodError (undefined method `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