-
Notifications
You must be signed in to change notification settings - Fork 27
Time - Ross & Sharon #3
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
Sharon videos branch
Ross customer branch
Ross rental tests
Sharon rental testing branch
Ross rental controller tests
Video Store APIMajor Learning Goals/Code Review
Functional Requirements
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
beccaelenzil
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 work on this project! Your code is clear and well written. Your controllers are concise, and you've put the business logic in the model. Furthermore, your code is well tested. Keep up the hard work!
| end | ||
|
|
||
| checkout = Rental.new(rental_params) | ||
| checkout.due_date = Date.today + 7.days |
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 is a very small amount of logic, but you might consider putting this logic into a custom model method.
| @@ -0,0 +1,32 @@ | |||
| frozen: | |||
| id: 1 | |||
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 best practice to not include ids in fixtures. They will be automatically generated.
|
|
||
|
|
||
|
|
||
| def increment_videos_checked_out_count |
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 work putting all this logic into custom model methods. You might also consider whether any of this logic could go directly in the video and/or customer model.
Assignment Submission: Video Store API
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
If you didn't get to the functionality the question is asking about, reply with what you would have done if you had completed it.
Reflection
/customers&/videosendpoints? What does the time complexity depend on? Explain your reasoning.POST /rentals/check-inendpoint? What does the time complexity depend on? Explain your reasoning.