There Are Four Lights
There Are Four Lights

Reputation: 1426

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?

Upvotes: 6

Views: 1349

Answers (1)

GermanDZ
GermanDZ

Reputation: 174

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

resources :users, :path => 'u'

Upvotes: 8

Related Questions