Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default route name

In my Rails 3.1 application i have a UsersController, which gives me /users URL.

But i need /u instead for all REST actions.

What is the best practice for that?

like image 850
There Are Four Lights Avatar asked Dec 06 '11 18:12

There Are Four Lights


People also ask

How do you define a default route?

A default route is the route that takes effect when no other route is available for an IP destination address. If a packet is received on a routing device, the device first checks to see if the IP destination address is on one of the device's local subnets.

Which command is used to configure a default route?

The command to configure this default route is: RouterA(config)#ip route 0.0.


1 Answers

You need to define the "path", in your case, modify routes.rb to

resources :users, :path => 'u'
like image 192
GermanDZ Avatar answered Oct 07 '22 20:10

GermanDZ