title: Using sanitize within a Rails controller
body: <p>I'm trying to call <code>sanitize</code> within a controller. Here's what I tried:</p>
  
  <pre><code>class FooController &lt; ApplicationController
    include ActionView::Helpers::SanitizeHelper
    # ...
  end
  </code></pre>
  
  <p>However, I'm getting this error:</p>
  
  <pre><code>undefined method `white_list_sanitizer' for FooController:Class
  </code></pre>
  
  <p>I searched around and people recommended switching the include line to include <code>ActionView::Helpers</code>, but that results in this error:</p>
  
  <pre><code>undefined method `url_for' for nil:NilClass
  </code></pre>
  
  <p>What's the correct way to call <code>sanitize</code>? I'm using Rails 2.3.5.</p>