How do you access Devise controllers?

后端 未结 5 1706
野趣味
野趣味 2020-12-04 11:04

Are controllers in devise automatically generated? How do you access them?

I know for views you do rails generate devise_views.

5条回答
  •  一个人的身影
    2020-12-04 12:02

    Below one is for Rails 5

    Generate rails devise controllers using the following command:

    rails generate devise:controllers users
    

    if you modified the above generated controllers, add the following line to the routes.rb,

    devise_for :users, controllers: {registrations:'user/registrations'}
    

    Your modifications will take effect once you restart the rails server

提交回复
热议问题