How do I change default Devise views paths?

徘徊边缘 提交于 2019-12-13 05:40:43

问题


I am developing a Rails project with Devise. By default all Devise views go to app/views/devise/... I would like instead, to have them in /app/views/users/... like:

  • app/views/users/sessions
  • app/views/users/registration
  • etc.

I got as far as rails generate devise:views users, but there is also some code change involved.

I don't want to change the controllers. I just want to have views in a different directory than the default one.


回答1:


I think without changing the controller you cant change the default folder for devise views. I suggest if you want to have different views then just make your changes in devise views.



来源:https://stackoverflow.com/questions/5230504/how-do-i-change-default-devise-views-paths

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