Hi fellow RoR’ers,
I have a Rails app, where a user can subscribe and unsubscribe from a
mailinglist. To unsubscribe, the user can fill in their email address
in a form field.
But I have no idea how to delete the record from the database, using
the typed in data from the user. I’ve tried it with the following
code, but doesn’t seem to work.
@email = Email.find(:all, :conditions => [ “mail = ?”, params[:mail]])
–> no error, but nothing happens
Or this way, didn’t work either,
–> then I got the following error: undefined method `find_by_mail’ for