0
的元素我有兩個型號沒有路線摧毀一個子關聯
Parent
has_many :children
Child
belongs_to :parent
而且我想有一個乾淨的軌道路線從父摧毀孩子。
resources :parents do
resources :children do
delete 'destroy'
end
end
,但我得到一個錯誤,同時調用parent_child_destroy_path
No route matches {:action=>"destroy", :controller=>"ads"}
不過動作的存在...
有誰知道如何得到這樣一個乾淨的路線?
thx,我沒有看到這種路線與耙路線...但你知道爲什麼我得到了骯髒的解決方案的錯誤? – knotito
@knotito,您如何在您的視圖中完全調用您的路線? – siekfried
事實上,正如你所說的問題是參數丟失......乾杯:) – knotito