I am trying to create a link to delete one row in a table but the problem is that I Instead [GET] gets [DELETE].
Error here: There is no mileage [GET] "/ club / 1 / club_accounting / 2"
My route is: club_club_accounting_delete_path DELETE / clubs /: club_id / club_accounting /: Id (.: Format) club_accounting # delete
My link:
& lt;% = link_to 'Supprimer', club_club_accounting_delete_path (: id = & gt; Activity .id ), Method :: Delete% & gt;
any idea
method? Delete In the
option LINK_TO
the attribute attribute data-method = "delete"
the resultant says & lt; an & gt;
tag. It is then controlled by the jquery_ujs
javascript file. Make sure it is included correctly and it appears in your page source. If so, open the Javascript console in your browser's developer tool to see if there are any JavaScript errors when clicking on the link.
In addition, your post code looks in order
Though the modest style suggests: you : id = & gt; For activity.id
path assistant, just use: club_club_accounting_delete_path (activity)
.
If you see any error messages, then post them back in your reply.
Comments
Post a Comment