Rails engine and devise

旧巷老猫 提交于 2019-12-04 12:53:51

Here's the how to:

  1. Rails plugin new cms --mountable -d postgresql

2: Install devise like normal

3: Add this in the main application routes file:

  devise_for :users, {
     class_name: 'Cms::User',
     module: :devise
   }

This line here, mentioned in the devise wiki, caused the problems for me:

config.router_name = :Cms_user 

Wiki: https://github.com/plataformatec/devise/wiki/How-To:-Use-devise-inside-a-mountable-engine

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