Devise Invitable: uninitialized constant

▼魔方 西西 提交于 2019-12-03 12:38:18
jonaphin

Actually, you must stick your invitations controller within a users directory under app/controllers for this to work.

So you would end up with:

/app/controllers/users/invitations_controller.rb

Doing this will get rid of that unitialized constant error.

Try changing

devise_for :users, controllers: { invitations: 'users/invitations' }

to

devise_for :users, controllers: { invitations: 'devise/invitations' }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!