Skip to content

Instantly share code, notes, and snippets.

@sushant12
Created June 4, 2017 11:31
Show Gist options
  • Select an option

  • Save sushant12/8e4a19ee1b288f09b0e3445b5ff579cf to your computer and use it in GitHub Desktop.

Select an option

Save sushant12/8e4a19ee1b288f09b0e3445b5ff579cf to your computer and use it in GitHub Desktop.
<form method="post" action="save">
Name: <input type="text" name="task">
<input type="submit" value="Save">
</form>
<h1>Tasks</h1>
<ol>
<% @tasks.each do |task|%>
<li><%= task.name %> <% if(task.finished == 1) %>(Finished) <% end %> <a href="/edit/<%= task.id %>">Edit</a> | <a href="/delete/<%= task.id%>">Del</a> </li>
<% end %>
</ol>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment