rails app creating a location based search using javascript