I am trying to integrate twitter with devise in my rails application.
However, I get this error The action 'twitter' could not be found for Devise::OmniauthCallbacksController
My routes file contains:
devise_for :conrollers => {:omniauth_callbacks => "omniauth_callbacks"}
I have seen a few thread but not quite able to fix this issue. Please help. This is my controller
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def twitter
raise request.env["omniauth.auth"].to_yaml
end
#alias_method :twitter, :all
end
Since
Devise::OmniauthCallbacksController
inherits fromDeviseController
, why not just add yourtwitter
methodDeviseController
?or you could do:
or if you have a
controllers/devise
directory, this might work: