-
Notifications
You must be signed in to change notification settings - Fork 47
Space - Becca #41
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?
Space - Becca #41
Conversation
…lay hard-coded tasks in tasks_controller.rb
…e rudimentary styles.
…action, added styles, cleaned for submission.
kaidamasaki
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.
Great job! Here are a few small things you can do to clean up your code.
| # patch '/tasks/:id', to: 'tasks#update', as: 'update_task' | ||
| # delete '/tasks/:id', to: 'tasks#destroy', as: 'destroy_task' | ||
|
|
||
| post '/tasks/:id', to: 'tasks#mark_complete', as: 'mark_complete' |
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 would recommend making this its own distinct endpoint (like you did with uncomplete) just to make it clearer what this does:
| post '/tasks/:id', to: 'tasks#mark_complete', as: 'mark_complete' | |
| post '/tasks/:id/complete', to: 'tasks#mark_complete', as: 'mark_complete' |
| return | ||
| else | ||
| @task.update( | ||
| completed_at: Time.now.strftime("%I:%M %p on %m/%d/%Y") |
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'd generally recommend setting this as the actual time option and having it stored in the database as a datetime.
| create_table :tasks do |t| | ||
| t.string :name | ||
| t.string :description | ||
| t.date :completed_at |
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.
You should use t.datetime for this column.
Task ListMajor Learning Goals/Code Review
Functional Requirements/Manual Testing
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions