ruby on rails - Change resources path -


i'm using rails 4

i have routes.rb file looks like:

resources :books 

however, i'd urls in application end looking /b/101 instead of /books/101.

i realize go through , rename each resource path individually, there not way changing resources somehow? kind of how can change params doing resources :books, params: :new_id?

here can

resources :books, path: 'b' 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -