-
Notifications
You must be signed in to change notification settings - Fork 43
Carets - Julia Meier - TaskList #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
|
CheezItMan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments.
|
|
||
| def show | ||
|
|
||
| @task = Task.find( params[:id].to_i ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header should be inside the body.
| <body> | ||
|
|
||
| <%= yield %> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the </div> match?
| <!-- TaskList#index --> | ||
|
|
||
| <!-- <h1 class="index-heading">Task List</h1> --> | ||
| <nav class="menu-container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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