title: How to call ApplicationController methods from ApplicationHelper
body: <p>I want to provide csv links in a view and I placed the csv generating code in <code>ApplicationHelper</code>. However I'm getting this error:</p>
  
  <pre><code>undefined method `send_data' for #&lt;#&lt;Class:0x0000010151c708&gt;:0x0000010151a070&gt;
  </code></pre>
  
  <p>referencing this:</p>
  
  <pre><code>send_data content, :type =&gt; "text/plain",
    :filename =&gt; filename,
    :disposition =&gt; 'attachment'
  </code></pre>
  
  <p>If I place the csv code in a controller it works fine. I was hoping to use the helper to avoid having to define routes for every controller I want to provide csv options for (I have a bunch). How can I make <code>send_data</code> (and other necessary methods) available to the helper?</p>