title: How to use Application Helpers in Ruby on Rails
body: <p>I'm attempting to post a random testimonial on each page of a site.  </p>
  
  <p>I started off by using an application helper like this:</p>
  
  <pre><code>module ApplicationHelper
  
    def random_testimonial
      @random_testimonial = Testimonial.find(:first, :offset =&gt; rand(Testimonial.count))
    end
  
  end
  </code></pre>
  
  <p>In my view I can reference the method but it's being called on each reference, which makes sense.  </p>
  
  <p>I'd like this to be called once on each page view exposing a Testimonial object I can use within the view.  </p>
  
  <p>What should I be looking for to do this?</p>