Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
默认情况下,resources 命令将new操作的 url 生成为{model}/new. 根据文档,发送path_names = {}哈希不会更改基数。{model}我将如何/submit着手posts#new采取行动?
new
{model}/new
path_names = {}
{model}
/submit
posts#new
match 'submit' => 'posts#new'
我希望这就是你正在寻找的...
如果您想了解它在幕后的工作原理,您可能想看看 Ryan Bates 的那两个很棒的截屏视频。
路由演练 路由演练第 2 部分