-
Notifications
You must be signed in to change notification settings - Fork 266
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
Jaren Garman #588
base: main
Are you sure you want to change the base?
Jaren Garman #588
Conversation
Bugfix/initial fixes
Feature/registrant class
Feature/vehicle registration
Feature/license tests
Feature/vehicle factory
Feature/analytics
Feature/facility hours
Feature/ny vehicles
|
||
@facilities.map(&:registered_vehicles).flatten.group_by(&:county).max_by do |_county, vehicle_array| | ||
vehicle_array.length | ||
end[0] |
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.
Nice use of chained enumerables! As a complimentary exercise, it's a good idea to practice talking through these solutions as they are more complex, and describing your thought process and approach to a solution can be great interview practice!
end | ||
|
||
def parse_address(facility) | ||
"#{unless facility[:street_address_line_1].nil? |
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 block of code is not very readable. I would much rather a more multi-line process that extracts each component as a variable and then maybe joins them at the end or uses string interpolation to combine the data together. Anytime you're using \
to join long strings together, it generally could indicate unreadable string manipulation
No description provided.