Women in Technology

Hear us Roar

  Rolling with Ruby on Rails
Subject:   Homework #1 issues
Date:   2006-09-11 20:58:12
From:   m3_del
Response to: Homework #1 issues

<td><%= link_to "Delete", :action => "destroy", :id => recipe.id %></td>

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

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • 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 => true snippet.

    I hope that helps.