Conversation
…d date picker in the new form
…er than the date the task is due. Changed form so that user does not input this info.
… the application view to the index view, and made a tailored menu for the form pages
Task ListWhat We're Looking ForHello Julia, Dee & I are switching off for the Rails unit on feedback & 1-1s. So I'll be doing your individual feedback for Rails.
|
|
|
||
| def show | ||
|
|
||
| @task = Task.find( params[:id].to_i ) |
There was a problem hiding this comment.
It's a good idea to have some sort of if statement here to handle the occasions where you can't find the given task. This applies to the actions, edit, delete, etc.
| end | ||
|
|
||
| def create | ||
| @task = Task.new(completion_date: nil, name: params[:task][:name], action: params[:task][:action], status: params[:task][:status]) |
There was a problem hiding this comment.
This would make a good use-case for strong params.
| <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> | ||
| <link href="https://fonts.googleapis.com/css?family=Homemade+Apple|Indie+Flower|Permanent+Marker|Sedgwick+Ave|Waiting+for+the+Sunrise|Walter+Turncoat" rel="stylesheet"> | ||
| </head> | ||
| <header class="header"> |
There was a problem hiding this comment.
The header should be inside the body.
| <body> | ||
|
|
||
| <%= yield %> | ||
| </div> |
| <!-- TaskList#index --> | ||
|
|
||
| <!-- <h1 class="index-heading">Task List</h1> --> | ||
| <nav class="menu-container"> |
There was a problem hiding this comment.
I suggest this nav should go in the layout file so it can be consistent between pages.
| <li class="show-status"><h4>status: | ||
| <%= @task.status ? "completed on #{@task.completion_date}" : "not yet complete" %></h3></li> | ||
| </ul> | ||
| <%else%> |
There was a problem hiding this comment.
This kind of logic, should probably be done in the controller, but you're not at that point in your rails training yet.
Good idea on how to handle this.
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions