【发布时间】:2011-06-22 14:24:53
【问题描述】:
我想从控制器操作响应对象,我只知道我可以得到这样的响应:
class HomeController < ApplicationController
after_filter :generate_html
def index
end
def generate_html
raise response.body # this will show response body content
end
end
现在如何初始化控制器并获取其响应对象? 因为我想在 Rails 应用程序中编写 static_page_generator。
【问题讨论】:
标签: html ruby-on-rails static-pages