Uninitialized persistent device :: controllers :: internalhelpers

I am new to rails and am currently working on authentication using devem gem. I would like to communicate with my server from my mobile application. Therefore, I am sending data via JSON. When I tried to log in, it shows me the error below:

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 used devise gem version 1.4.6, it worked fine for me. But I want it to work with devise version 2.1.0 or later, in order to be able to use any new features that it supports.

If anyone has this suggestion or have any ideas, please help me. Thanks in advance.

Hi,

Senthil.

+7
source share
1 answer

Looking at the past commit, InternalHelpers was deleted: https://github.com/plataformatec/devise/commit/d9df632671b568e85bc79feb2c8de54fa0518f73

Based on a test case for InternalHelpers, you should now inherit directly from DeviseController, since most of the InternalHelper methods are already included.

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

class MyController <DeviseController

end

Hope this helps!

+16
source

All Articles