A rails app which gets users location using HTML5 geolocation and saves to data base

后端 未结 3 1939
执笔经年
执笔经年 2021-02-02 04:40

Seems pretty simple but I\'m struggling.

Here\'s what I have so far in the view. I display the location coords just to test its working. But I also want to persist on Da

3条回答
  •  星月不相逢
    2021-02-02 05:28

    Check out this answer. Basically, just set the geolocation via a cookie and read the lat and long from the cookie in your controller.

提交回复
热议问题