Railsのroutingで詳細ページのparamsをid以外に変える
通常 routes.rbでroutelingを記述すると
Rails.application.routes.draw do resources :posts end
GET/posts(.:format) posts#index POST /posts(.:format) posts#create GET /posts/new(.:format) posts#new GET /posts/:id/edit(.:format) posts#edit GET /posts/:id(.:format) posts#show PATCH /posts/:id(.:format) posts#update PUT /posts/:id(.:format) posts#update DELETE /posts/:id(.:format) posts#destroy