Created
December 2, 2012 23:44
-
-
Save nickdenardis/4191614 to your computer and use it in GitHub Desktop.
Ruby ERB examples
This file contains 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
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