Hello all I have a Delete link that I’m trying to create with the following code:
<%= link_to 'Delete', element, method: :delete, data: { confirm: 'Are you sure?' } %>
However the resulting link is /element.id where the id is the integer id. How would I change that . to a / sorry I know this is very elementary but I couldn’t find any documentation on it.
Try this
Replace
modelnamewith the name of your model.Run
rake routesin terminal in your app to see all routes.