1. 程式人生 > >嵌套路由

嵌套路由

des class edit str resource end tro method ack

  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)

嵌套路由