I'm making the airbnb clone now. In this application I'm using geocoder gem and google autocomplete.
In the top page, there is a search form. In that form I'm using autocomplete and Geocoder.
When user select autocomplete field I get lat and lng from autocomplete.
When user doesn't select autocomplete suggestions, they get the lat and lng data from the Geocoder.coordinates.
The problem is when user selecet "Mariana bay sands singapore" in autocomplete, it returns the lat and lng params.
But user type the "Mariana bay sands singapore" in the search form (not select auto complete suggestions), it doesn't return the lat and lng params.
How can I get the lat and lng params like airbnb?