Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uninitialized constant devise::controllers::internalhelpers

I'm new to rails and currently working on authentication using devise gem. I would like to communicate with my server from my mobile app. So I'm sending data via JSON. When I tried to sign in it shows me the below error:

  ActionController::RoutingError (uninitialized constant Devise::Controllers::InternalHelpers):
  app/controllers/session_controller.rb:4:in `<class:SessionController>'
  app/controllers/session_controller.rb:1:in `<top (required)>'

When I was using devise gem version 1.4.6, it was working fine for me. But, I want to make it work with devise version 2.1.0 or later to be able to use any new features that it supports.

If anybody have this running or have any idea please help me. Thanks in advance.

Regards,

Senthil.

like image 709
senthil Avatar asked Jul 24 '12 15:07

senthil


1 Answers

Looking at the past commit, InternalHelpers has been removed: https://github.com/plataformatec/devise/commit/d9df632671b568e85bc79feb2c8de54fa0518f73

Based on the test case for InternalHelpers, you should now, inherit directly from DeviseController as most InternalHelper methods are included in there already.

https://github.com/plataformatec/devise/blob/master/test/controllers/internal_helpers_test.rb

class MyController < DeviseController

end

Hope this helps!

like image 147
Adrian Teh Avatar answered Sep 20 '22 07:09

Adrian Teh