mirror of https://github.com/E-Almqvist/hsf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
662 B
20 lines
662 B
3 years ago
|
h2 Create TODO:
|
||
|
form action="/todos/new" method="post"
|
||
|
input type="text" name="content" placeholder="I need to do..."
|
||
|
input type="hidden" name="id" value="#{session[:id]}"
|
||
|
input type="submit" value="Submit"
|
||
|
|
||
|
h2 Your TODOS:
|
||
|
ol
|
||
|
- todos.each do |todo|
|
||
|
li
|
||
|
label = todo["content"]
|
||
|
|
||
|
form.inline action="todos/#{todo["id"]}/edit" method="get"
|
||
|
input type="submit" value="Edit"
|
||
|
|
||
|
form.inline action="todos/#{todo["id"]}/delete" method="post"
|
||
|
input type="hidden" name="user_id" value="#{session[:id]}"
|
||
|
input type="hidden" name="todo_id" value="#{todo["id"]}"
|
||
|
input type="submit" value="Remove"
|