DEV Community

n350071🇯🇵
n350071🇯🇵

Posted on

[Devise] Arbitrary Routing (任意のルーティング)

TL;DR

devise_for :users, class_name: 'InviteUser', skip: :all
devise_scope :user do
  post 'user/create', to: 'users#create'
  get 'user/confirm', to: 'users#confirm'
  put 'user/accept', to: 'users#accept'
end
  • both methods are defined in Devise
  • you can SKIP all pre routing (for no conflict routing)
  • The point are
    • users for devise_for
    • user for devise_scope
  • you can read the files by bundle open devise

🔗 Parent Note

Top comments (0)