Destroy doesn't destroy!

I’m using a MySQL server and the user my rails app is logging in as is
root has all permissions.

My destroy code is default scaffolding:

def destroy
redirect_to :action => ‘list’

Why is

<%= link_to ‘Destroy’, :action => ‘destroy’, :id => @customer %>

not destroying the SQL row? @customer is the correct id.

Any ideas?

  • David

Cuz you be missing .id on the :id => @customer param. I’m not sure if
@customer returns a different number (4 I think), and as a result you
may have destroyed a different record. Surprised there wasn’t an error
or warning.