DEV Community

n350071🇯🇵
n350071🇯🇵

Posted on

2 2

[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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay