I am trying to display a list of salons
that correspond to the users location on the show view of treatment
.
The two tables don't have a direct relationship.
I have installed the geokit
gem and now I am trying to work out if I need to add additional columns also to salon
and user
to store their respective co-ordinates(lat,lng) so that I can compare them using a scope.
How to I retrieve the users location via their IP and store it?
If someone could show me some example code of what the model/view and controllers should look like it would be of great help.