嵌套路由
Posted znsongshu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了嵌套路由相关的知识,希望对你有一定的参考价值。
resources :buyers do
resources :invoices
end
= link_to ‘Show‘, buyer_invoice_path(@buyer, invoice)
= link_to ‘Edit‘, edit_buyer_invoice_path(@buyer, invoice)
= link_to ‘Destroy‘, [@buyer, invoice], :method => :delete, :data => { :confirm => ‘Are you sure?‘ }
= link_to ‘Back‘, buyer_invoices_path(@buyer, @invoice)
以上是关于嵌套路由的主要内容,如果未能解决你的问题,请参考以下文章