Skip to content

Instantly share code, notes, and snippets.

@nickdenardis
Created December 2, 2012 23:44
Show Gist options
  • Save nickdenardis/4191614 to your computer and use it in GitHub Desktop.
Save nickdenardis/4191614 to your computer and use it in GitHub Desktop.
Ruby ERB examples
Loops:
<ul>
<% for task in @tasks %>
<li id="task_<%= task.id %>"><%= task.task %>
| <%= link_to 'Edit', edit_task_path(task) %>
| <%= link_to 'Delete', task, :method => 'delete' %>
</li>
<% end %>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment