Rails 中 render 方法的可选参数

Aiur · Zellux at 
:content_type 设置返回内容的 MIME 类型 render :file => filename, :content_type => 'application/rss':layout 指定 layout:status 指定返回的 HTTP 代码:location 指定 HTTP 头中的 Location 字段 Rails 生成的 controller 代码中,create.json 方法在生成对象后会将 Location 设置为新生成对象的 json 地址: respond_to do |format| if @item.save format.htm……