Skip to content

Instantly share code, notes, and snippets.

@blischalk
Created March 24, 2012 00:39
Show Gist options
  • Save blischalk/2176777 to your computer and use it in GitHub Desktop.
Save blischalk/2176777 to your computer and use it in GitHub Desktop.
form_for example
=form_for(@contacts, as: :contact, url: contact_delete_path, method: 'delete') do
- for contact in @contacts
%tr
%td= check_box_tag 'contact_ids[]', contact.id, false
%td= contact.email
%td= truncate contact.message, length: 150
%td= link_to 'Show', contact
%td= link_to 'Edit', edit_contact_path(contact)
%td= link_to 'Destroy', contact, :confirm => 'Are you sure?', :method => :delete
%tr
%td=submit_tag 'Delete', name: 'commit', value: 'Delete', confirm: 'Are you sure?'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment