tandrew468

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

Hi Guys i am getting an error this is is my Omniauth controller

class OmniauthCallbackController < ApplicationController
def twitter
twitter_account = Current.user.twitter_accounts.where(username: auth.info.nickname).first_or_initialize
twitter_account.update(
name: auth.info.name,
username: auth.info.nickname,
image: auth.info.image,
token: auth.credentials.token,
secret: auth.credentials.secret,
)

        redirect_to root_path, notice: "Success Account Connection"
end

def auth 
    request.env['omniauth.auth']
end

end