Hello,
I am new to Ruby on Rails and sometimes having a real hard time tying everything together...
For my mobile website I have to get the current position (geolocation) of a user every 5 minutes and compare this position and the current time with values of position/time stored in my database. Depending on those values I might have to update another database table and do some javascript alert or update my view.
Unfortunately, I have no idea where to place the code for all this stuff. The periodical check of the geolocation I could do with javascript but how do I query and update the database? In my .js-file as well? I think this is not the best separation of model, view and controller, is it? Is there maybe any way to do those pollings in my controller directly?
Thanks for any help!