问题
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