| Article: |
Rolling with Ruby on Rails | |
| Subject: | Homework #1 issues | |
| Date: | 2006-09-11 20:54:52 | |
| From: | m3_del | |
|
I am atempting to add a delete ("destroy") link at the end of the listing table. my HTML is as follows. Recipe</td> Category</td> Date</td> Delete</td> <%= link_to "Create new recipe", :action => "new" %> |
||
Showing messages 1 through 2 of 2.
-
Homework #1 issues
2006-09-11 20:58:12 m3_del [View]
-
Homework #1 issues
2006-09-15 03:54:37 StBob [View]
I've been laborating a bit with that stuff too and it seems like the destroy function want somekind of confirmation.
<%= link_to "Delete", {:action => "destroy", :id => recipe.id },
:confirm => 'Are you sure?', :post => true %>
This code works, I don't really know why, but I think it is because of the:post => truesnippet.
I hope that helps.



This is the line I am refering to in the above code. Sorry it seemed to format that all a little weird