For standard rails resourceful actions (say communications controller )
index
create
show
update
show has parameter id
get /communications/:id
route
Is it possible I can have
get /communications/:username
for show action?
Thanks for any help.
尝试使用以下resources :communications, param: :username
有关更多信息,请访问http://guides.rubyonrails.org/routing.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.