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