Closed tbuckl closed 10 years ago
also, right now we make an inDistrict? call and then a getDistrict call. can you recall why we need both of those? shouldn't an empty District in getDistrict just tell us its not inDistrict? this results in calling arcgis twice.
shouldn't an empty District in getDistrict just tell us its not inDistrict? this results in calling arcgis twice.
That seems like a better way to do it, yes.
it seems like all we strictly need to do is geocode. i'm not even sure why we reverse geocode.
Yeah, refactoring that controller could result in cleaner code. Let's talk about it tomorrow.
i think maybe we can close this now
I have a little bit more that improves this...
this is way better now. thanks @techieshark
@techieshark do we need to grab an imaginary point, and then reverse geocode it?
it seems like all we strictly need to do is geocode. i'm not even sure why we reverse geocode.
so maybe we just strip addresses_controller.rb down to a geocode call.
and then move all of the other stuff to the /council_district.rb controller. because all its really doing now in the arcgis branch is e.g. CouncilDistrict.find(6).