title: Rabl.render: how to use view helper methods?
body: <p>I'm using Rabl to generate XML output in a rake task:</p>
  
  <pre><code>xml = Rabl.render @listings, 'feeds/listings', :format =&gt; :xml
  # do stuff with xml
  </code></pre>
  
  <p>However, I need to use multiple helper methods in the rabl view file referenced, and I keep getting a <code>NoMethodError</code> as I expected from the answer to <a href="https://stackoverflow.com/questions/9999789/how-to-render-a-rabl-view-in-a-rake-task">this question</a>. </p>
  
  <p>I tried using <code>extends</code> and <code>include</code> in the class used by the rake task but I still get the same error on the helper methods:</p>
  
  <pre><code>require "#{Rails.root}/app/helpers/feeds_helper.rb"
  
  class SerializeData
    extends FeedsHelper
  
    def perform
      xml = Rabl.render @listings, 'feeds/listings', :format =&gt; :xml
      # do stuff with xml
    end
  end
  </code></pre>
  
  <p>My question is: is there any way to use helper methods in rabl view files generated in this way? (or at least in a way that I can still render them as a string in a rake task?) The helper methods are used many, many times to correctly format various data per fixed requirements, so it would be very difficult to remove them entirely.</p>