给定像Thread(id,uuid)这样的模型uuid是唯一生成的标识符.我想更改默认路由:
edit_thread GET /threads/:id/edit(.:format) {:action=>"edit",:controller=>"threads"} thread GET /threads/:id(.:format) {:action=>"show",:controller=>"threads"} PUT /threads/:id(.:format) {:action=>"update",:controller=>"threads"}
不使用:id但是对用户:uuid —如何在Rails / routes.rb中实现这一点?
谢谢
解决方法
原文地址:https://www.jb51.cc/ruby/270199.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。