I am using a Twitter gem, however I was hoping to understand how to run it in the background after the page loads.
Currently I need to wait for the page to render, since the gem is working to query some tweets. Once the gem gets its response, the page loads.
However, I was hoping to display a "loading" GIF in my Twitter feed "div" tag, and once the Twitter information is retrieved, replace this GIF with the respective content.
I read several posts how to use a form and the ":remote => true" tag on the form in order to do AJAX calls that won't reload the respective page, but I don't want to force visitors to click a link in order to see Twitter tweets.
I'm using:
- Ruby version: 1.8.7
- Rails version: 3.0.9