0
resources :listings do
member do
post :leadcreate
post :storycreate
end
末
控制器動作
def destroy
@listing = Listing.find(params[:id])
@listing.destroy
redirect_to 'root_path', :notice => "Listing Successfully Deleted"
end
查看
<%= link_to "Delete", listing_path(@listing), :confirm => "Confirm Deletion", :method => :delete %>
錯誤
它只是爲「No數據接收「頁面,然後當我刷新並返回到根目錄時,該列表實際上已被刪除。