5
如果我有可选参数的路线的路线如下:Rails的url_for命名为可选参数
match 'comments/new(/:post_id/(/:parent_id))' => 'comments#new'
有没有干净的方式来创建名为航线的联系?显然,我可以这样做:
link_to "New Comment", "comments/new/#{post_id}"
但我认为有一个更清洁的方法。我只是在url_for或link_to文档中找不到任何参考。