Created
March 24, 2012 00:39
-
-
Save blischalk/2176777 to your computer and use it in GitHub Desktop.
form_for example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=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