无论如何回应.yml文件扩展名?
我试过了,但无法让它发挥作用.
respond_to do |format|
format.xml # index.xml.builder
format.yml {render :text => @labels.to_yaml, :content_type => 'text/yaml'}
end
Run Code Online (Sandbox Code Playgroud)
上面的代码吐出以下错误 uninitialized constant Mime::YML
| 归档时间: |
|
| 查看次数: |
3462 次 |
| 最近记录: |