ruby - Prefixing Route Controllers in Rails -


is there way prefix controller path in routes.rb, don't have specify manually?


before:

resources :users, :controller => 'api/users' 

after:

resources :users, :controller => 'api/users' 

or after:

resources :users 

namespace :api   resources :users end 

guide


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -