Closed jamesatheyDDS closed 6 years ago
@jgarber623-gov Given your comments on the my_zipcode_gem
-supplied models, one could argue that I should just ditch the gem entirely, since we're not using its downloader task, or large parts of the models it provides, or any of the County functionality. I could refactor this PR to just use the CSV files from the free_zipcode_data
project, trim down the models to just the code we need, and remove all of the extra dependencies my_zipcode_gem
wants to introduce.
@jgarber623-gov The PR is much shorter now.
Checklist
I have…
bin/rails server
) and verified that my changes behave as expected.bin/rubocop
) and vulnerability scan (bin/brakeman
) against my changes.bin/rake spec
) and verified that all tests pass.Summary of Changes
This pull request utilizes data from the GitHub project
free_zipcode_data
to power the ZIP code search functionality in the locator maps instead of relying on Google for it.In the unlikely event of the user appending
?query=62225
(as an example) to the locator map URL, or following a link to the page with that in the URL, the results will now say "Displaying results near Scott Air Force Base, IL 62225" (the city and state associated with the ZIP code) instead of "Displaying results near 38.5426987, -89.8551818" (the lat / lng associated with the ZIP code).That said, if the user follows the normal route of typing "62225" in the search box, the page will still show the coordinates instead of the city state. Addressing that will require a more extensive change to the
locations_controller.rb
.Testing
To verify the changes proposed in this pull request…
my_zipcode_gem
,bin/rails server
, andScreenshots
Results from searching for 62225 - same as before
Results with ?query=62225 in the URL