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