Create inherited Devise controllers in your app/controllers folder.
Use -c to specify which controller you want to overwrite.
If you do no specify a controller, all controllers will be created.
For example:
rails generate devise:controllers users -c=sessions
This will create a controller class at app/controllers/users/sessions_controller.rb like this:
class Users::SessionsController < Devise::SessionsController
content...
end
1条答案
按热度按时间icnyk63a1#
引用
devise
gem 的 controller generator 源 代码 :中 的 每 一 个