diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-04-27 14:21:02 +0200 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-04-27 14:21:02 +0200 |
commit | f4447607f20c420d9c341b19064c07d5b7aa6cee (patch) | |
tree | c389a5bb39707e5cf556cc7ca92690c77d8c143e /guides/code/getting_started/app/views | |
parent | 8c1633328699cc00b1b8a893bffa6390c2cdfcc0 (diff) | |
download | rails-f4447607f20c420d9c341b19064c07d5b7aa6cee.tar.gz rails-f4447607f20c420d9c341b19064c07d5b7aa6cee.tar.bz2 rails-f4447607f20c420d9c341b19064c07d5b7aa6cee.zip |
Add delete post section to Getting Started guide
Diffstat (limited to 'guides/code/getting_started/app/views')
-rw-r--r-- | guides/code/getting_started/app/views/posts/index.html.erb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/code/getting_started/app/views/posts/index.html.erb b/guides/code/getting_started/app/views/posts/index.html.erb index 3ba7091c15..7b72720d50 100644 --- a/guides/code/getting_started/app/views/posts/index.html.erb +++ b/guides/code/getting_started/app/views/posts/index.html.erb @@ -8,6 +8,7 @@ <th>Text</th> <th></th> <th></th> + <th></th> </tr> <% @posts.each do |post| %> @@ -16,6 +17,7 @@ <td><%= post.text %></td> <td><%= link_to 'Show', :action => :show, :id => post.id %> <td><%= link_to 'Edit', :action => :edit, :id => post.id %> + <td><%= link_to 'Destroy', { :action => :destroy, :id => post.id }, :method => :delete, :confirm => 'Are you sure?' %> </tr> <% end %> </table> |