title: How to get rails response object in code?
body: <p>I want to manipulate response object from a controller, I just know I can get response like this:</p>
  
  <pre><code>class HomeController &lt; ApplicationController
    after_filter :generate_html
  
    def index
  
    end 
  
    def generate_html
      raise response.body # this will show response body content
    end  
   end
  </code></pre>
  
  <p>Now how can I initialize a controller and get its response object?
  Because I want to write static_page_generator in a rails application.</p>