title: How to display an activity loader automatically with all ajax requests?
body: <p>I am working on Ruby on Rails application, with Prototype.
  I want to display a loading div automatically  with every ajax request and hide it on completion, without writing code for every ajax request in my application.
  Is there anyway to do this.</p>
  
  <pre><code>&lt;div id="loader"&gt;Loading...&lt;/div&gt;
  </code></pre>