location#get_coordinates_from_api -> consider moving this to a controller instead of having in a model. I prefer models without callbacks, as callbacks mean that an object that is something, always must do something.
midpoint#self.calculate(locations) - you may be able to do find_or_create by multiple attributes, not sure.
I like the comments in the searchescontroller - keep that procedure in the controller, and don't use it with callbacks in the model.
location#get_coordinates_from_api -> consider moving this to a controller instead of having in a model. I prefer models without callbacks, as callbacks mean that an object that is something, always must do something.
midpoint#self.calculate(locations) - you may be able to do find_or_create by multiple attributes, not sure. I like the comments in the searchescontroller - keep that procedure in the controller, and don't use it with callbacks in the model.