Skip to content

Instantly share code, notes, and snippets.

@Rosa-Fox
Created June 5, 2015 15:12
Show Gist options
  • Save Rosa-Fox/618d7fc11356fda290a9 to your computer and use it in GitHub Desktop.
Save Rosa-Fox/618d7fc11356fda290a9 to your computer and use it in GitHub Desktop.
show.erb the second
<div class="todo">
<div class="panel panel-default">
<div class="container">
<div class="panel-body">
<h2><%= @todo.id %>: <%= @todo.title %></h2>
<h4>More Info: <%= @todo.description %></h4>
<div class="row">
<div class ="col-md-1">
<a href="/todo" class="btn btn-default">Back</a>
<a href="/todo/<%= @todo.id %>/edit" class="btn btn-info">Edit</a>
<form action="/todo/<%= @todo.id %>complete" method="post">
<input type="hidden" name="_method" value="put" />
<input type="submit" value="Complete" class="btn btn-success">
</form>
<form action="/todo/<%= @todo.id %>" method="post">
<input type="hidden" name="_method" value="delete" />
<input type="submit" value="Delete" class="btn btn-danger">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@miguelgraz
Copy link

Line 12 lacks a / between the todo.id and the complete
form action="/todo/<%= @todo.id %>/complete"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment