Skip to main content
1 of 2
user229044
  • 853
  • 5
  • 15

Yes, use namespace and resources:

namespace :oauth do
  resources :apps, controller: "applications", as: :applications
end

This is not 100% identical (the names of some of your routes have changed) but it is the way you should be building your routes, and you should change the rest of your app to reflect the change.

Your rake routes:

       oauth_applications GET    /oauth/apps(.:format)             oauth/applications#index
    new_oauth_application GET    /oauth/apps/new(.:format)         oauth/applications#new
           oauth_apps_new POST   /oauth/apps/new(.:format)         oauth/applications#create
        oauth_application GET    /oauth/apps/:id(.:format)         oauth/applications#show
   edit_oauth_application GET    /oauth/apps/:id/edit(.:format)    oauth/applications#edit
                          POST   /oauth/apps/:id/edit(.:format)    oauth/applications#update
destroy_oauth_application DELETE /oauth/apps/:id/destroy(.:format) oauth/applications#destroy

My rake routes:

    oauth_applications GET    /oauth/apps(.:format)          oauth/applications#index
 new_oauth_application GET    /oauth/apps/new(.:format)      oauth/applications#new
                       POST   /oauth/apps(.:format)          oauth/applications#create
edit_oauth_application GET    /oauth/apps/:id/edit(.:format) oauth/applications#edit
     oauth_application GET    /oauth/apps/:id(.:format)      oauth/applications#show
                       PUT    /oauth/apps/:id(.:format)      oauth/applications#update
                       DELETE /oauth/apps/:id(.:format)      oauth/applications#destroy
user229044
  • 853
  • 5
  • 15