Hey,
I have a new error that I can't seem to fix that is occuring whilst I try to delete contacts from my basic Contact App.
At the moment I am defining the destroy action in my contacts controller as:
In my view I have:Code:def destroy current_user.contacts.delete(params[:id]) redirect_to index_path end
and the error I am getting is:Code:<%= button_to 'Delete', contact, :method => :delete %>
Any help people can offer on this really would be much appreciated!Code:ActiveRecord::AssociationTypeMismatch in ContactController#destroy Contact(#24465528) expected, got String(#10155204)
Thanks,
Tom




Reply With Quote
Bookmarks