Skip to content

Instantly share code, notes, and snippets.

@gaustin
Created January 1, 2011 06:55
Show Gist options
  • Save gaustin/761600 to your computer and use it in GitHub Desktop.
Save gaustin/761600 to your computer and use it in GitHub Desktop.
Iteration in haml?
%h1 New document
%table
%tr
%th
%th
%th
= @documents.each do |document|
%tr
%th= link_to 'Show', document
%th= link_to 'Edit', edit_document_path(document)
%th= link_to 'Destroy', document, :confirm => 'Are you sure?', :method => :delete
= end
= link_to 'New Document', new_document_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment