I just made a new app, and am wondering how I would route it. A user has_many companies,but how how do I route it so? I am using devise.
::Application.routes.draw do
devise_for :users do
resources :companies
end
root :to => "home#index"
end
I’d suggest separating between devise routes and other app routes:
This also means that devise will use /accounts/* instead of /users/* for its authentication paths and so /users/* will remain free for your use.
You can also look at devise’s routing documentation.