Change the default route name

In my Rails 3.1 application, I have a UserController that gives me / users a URL.

But I need / u instead of all the REST actions.

What is the best practice for this?

+6
source share
1 answer

You need to define a "path", in your case, change route.rb to

resources :users, :path => 'u' 
+8
source

Source: https://habr.com/ru/post/903220/


All Articles