Ok!
<h1>Showing post</h1>
<table border="1">
<tr>
<th width="10%"><em><b>Title:</b></em></th>
<td width="90%"><b><%=h @post.title %></b></td>
</tr>
<tr>
<th width="10%"><em>Message:</em></th>
<td width="90%"><%=h @post.body %></td>
</tr>
</table>
<%= link_to 'Edit', edit_post_path(@post) %> |
<%= link_to 'Delete',{:action => 'destroy', :id =>
@post.title}, :confirm => 'Are you sure?', :post => true %> |
<%= link_to 'Back', posts_path %>
This is what isn't working. I would like to get it to work. I want the
page to go away, delete the data and take me back to index.html
On Sep 16, 6:09 am, luis tomas <[EMAIL PROTECTED]> wrote:
> Destroy method works with any database because is an ActiveRecord's
> method.
> Post your code.
>
> On Sep 15, 10:43 pm, Presario 6331RSH HAM <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hey all,
>
> > I built the Blog from examples and samples and my blog recipe.txt.
> > Now I have modified it to
> > make it prettier and one of the things that I did was put the Delete
> > link in the post.show.html.
> > It doesn't work though and I need help using Delete ('destroy') so I
> > can delete them from the database. Do these work the same for sqlite3
> > as they do for mysql? Perhaps one may not delete the page that they
> > are on also but at least take it out of the db before navigating away
> > from the page we're on?
>
> > Cookin' with Rails?- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---