未初始化的常量设计:: controllers :: internalhelpers [英] uninitialized constant devise::controllers::internalhelpers
问题描述
我很喜欢rails,目前正在使用devise gem进行身份验证。我想从我的移动应用程序与我的服务器通信。所以我通过JSON发送数据。当我尝试登录时,会显示以下错误:
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)>'
当我使用devise gem 1.4.6版本,这对我来说很正常。但是,我想使它与设计版本2.1.0或更高版本一起使用,以便能够使用它支持的任何新功能。
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.
请问,
Senthil。
推荐答案
查看过去的提交,InternalHelpers已被删除:
https://github.com/plataformatec/devise/commit/d9df632671b568e85bc79feb2c8de54fa0518f73
Looking at the past commit, InternalHelpers has been removed: https://github.com/plataformatec/devise/commit/d9df632671b568e85bc79feb2c8de54fa0518f73
根据InternalHelpers的测试用例,您现在应该直接从DeviseController继承,因为大多数InternalHelper方法已经包含在这里。
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
class MyController < DeviseController
结束
希望这有帮助!
这篇关于未初始化的常量设计:: controllers :: internalhelpers的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!