-
Notifications
You must be signed in to change notification settings - Fork 25
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
RideShare - Carets - Marisa Morris & Isabel Suchanek #14
base: master
Are you sure you want to change the base?
Conversation
…drivers, new driver, and new passenger.
…utton to for the sake of uniformity. commented out button_to
… out in editing process.
…er adding a rating validations so I added a default rating to the new trip action
…hoose which page number to display.
Rideshare-RailsWhat We're Looking For
|
end | ||
end | ||
|
||
return (rating.to_f / counter) |
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 happens if there are no trips associated with the driver? Then this above line will execute with counter = 0 and rating = 0. In Ruby, 0.0/0
evaluates to NaN
(Not a Number), so in the driver show page, if there are no trips associated with the driver, then NaN.to_s
will evaluate to the string "NaN" and is shown on the page.
Good work with the site! It looks really nice and works really well. It accomplishes all of the requirements. I left a comment on one little bug where it shows "NaN" on page. Good job continuing to use the Trello board |
Rideshare-Rails
Congratulations! You're submitting your assignment! These comprehension questions should be answered by both partners together, not by a single teammate.
Comprehension Questions