![](/img/trans.png)
[英]ActionController::UnknownFormat when I use respond_to + respond_with (Rails 4)
[英]ActionController::UnknownFormat for respond_with
我返回到我的ruby on rails項目,發現我得到了:
ActionController::UnknownFormat
錯誤的非常簡單的代碼行:
respond_with(allMatches)
allMatches哈希定義為:
allMatches = { "matchesProposed" => proposedMatchAndNeedsActionObjects,
"matchesReceived" => receivedMatchAndNeedsActionObjects,
"scheduledMatches" => scheduledMatches}
我已經在班級聲明:
class HomeController < ApplicationController
respond_to :json
該代碼一直運行良好,直到今天-無需更改! 有什么想法嗎?
錯誤ActionController::UnknownFormat
當存在未指定的格式中的請求被升高respond_to
或respond_with
。
既然你沒有提供任何進一步的信息,只是最少的代碼示例,您將不得不繼續挖掘自己 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.