Ask A Question

Notifications

You’re not receiving notifications from this thread.

Unable to autoload constant OmniauthCallbacksController, expected /home/ec2-user/environment/Assignment/app/controllers/omniauth_callbacks_controller.rb to define it

tandrew468 asked in Rails

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

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.