-
Notifications
You must be signed in to change notification settings - Fork 45
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
Jamila Cornick Octos #35
base: master
Are you sure you want to change the base?
Conversation
…ate reservations in admin class
@room_list = all_rooms | ||
@reservation_list = [] | ||
|
||
if reservation_list == [] |
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.
How would this code path be executed where this conditional is false?
res_cost = reservation.total_cost | ||
# puts res_cost | ||
return res_cost | ||
elsif reservation.guest != res_name |
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 will happen with this if the reservation you're looking for is the second in the list? (hint: unexpected behavior)
(num_of_rooms).times do | ||
reserved_unit = rm_units.sample | ||
if reserved_unit.status == :UNAVAILABLE | ||
while reserved_unit.status == :UNAVAILABLE |
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.
Why do you need an if
and a while
?
HotelWhat We're Looking For
More commits would be good! |
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions