0
如何设置响应以便动态生成的json数据将被浏览器下载,而不是显示?Rails渲染JSON - 如何下载响应?
我使用主动联系
member_action :download, :method => :get do
application = Application.find(params[:id])
respond_to do |format|
format.json { render json: application.to_json(include: { categories: { include: { my_cases: { include: [{ questions: { include: :answers } }, :keys ] } } } }) }
end
end