title: Is that possible to call method that uses "content_tag" from controller in Rails 3?
body: <p>In my Rails 3 application I use Ajax to get a formatted HTML:</p>
  
  <pre><code>$.get("/my/load_page?page=5", function(data) {
    alert(data);
  });
  
  class MyController &lt; ApplicationController
    def load_page
      render :js =&gt; get_page(params[:page].to_i)
    end
  end
  </code></pre>
  
  <p><code>get_page</code> uses the <code>content_tag</code> method and should be available also in <code>app/views/my/index.html.erb</code>.</p>
  
  <p>Since <code>get_page</code> uses many other methods, I encapsulated all the functionality in:</p>
  
  <pre><code># lib/page_renderer.rb
  module PageRenderer
    ...
    def get_page
      ...
    end
    ...
  end
  </code></pre>
  
  <p>and included it like that:</p>
  
  <pre><code># config/environment.rb
  require 'page_renderer'
  
  # app/controllers/my_controller.rb
  class MyController &lt; ApplicationController
    include PageRenderer
    helper_method :get_page
  end
  </code></pre>
  
  <p>But, since the <code>content_tag</code> method isn't available in <code>app/controllers/my_controller.rb</code>, I got the following error:</p>
  
  <pre><code>undefined method `content_tag' for #&lt;LoungeController:0x21486f0&gt;
  </code></pre>
  
  <p>So, I tried to add:</p>
  
  <pre><code>module PageRenderer
    include ActionView::Helpers::TagHelper    
    ...
  end
  </code></pre>
  
  <p>but then I got:</p>
  
  <pre><code>undefined method `output_buffer=' for #&lt;LoungeController:0x21bded0&gt;
  </code></pre>
  
  <p>What am I doing wrong ?</p>
  
  <p>How would you solve this ?</p>