Skip to content

Instantly share code, notes, and snippets.

@douglasnomizo
Created October 30, 2013 18:59
Show Gist options
  • Select an option

  • Save douglasnomizo/7238112 to your computer and use it in GitHub Desktop.

Select an option

Save douglasnomizo/7238112 to your computer and use it in GitHub Desktop.
view
<td><%= link_to "Delete", { controller: 'users', action: 'delete', id: user.id }, { confirm: 'Are you sure?', method: :delete } %></td>
controller
User.find(params[:id]).destroy
routes file
delete 'users/delete/:id', to: 'users#delete'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment