[英]ActionController::UnknownFormat for respond_with
I have returned to my ruby on rails project to find that I am getting: 我返回到我的ruby on rails项目,发现我得到了:
ActionController::UnknownFormat
error for a very simple line of code: 错误的非常简单的代码行:
respond_with(allMatches)
The allMatches hash is defined as: allMatches哈希定义为:
allMatches = { "matchesProposed" => proposedMatchAndNeedsActionObjects,
"matchesReceived" => receivedMatchAndNeedsActionObjects,
"scheduledMatches" => scheduledMatches}
I have declared at the class level: 我已经在班级声明:
class HomeController < ApplicationController
respond_to :json
The code has been functioning just fine, until today - no changes! 该代码一直运行良好,直到今天-无需更改! Any thoughts? 有什么想法吗?
The error ActionController::UnknownFormat
is raised when there is a request in a format that is not specified in respond_to
or respond_with
. 错误ActionController::UnknownFormat
当存在未指定的格式中的请求被升高respond_to
或respond_with
。
Since you did not provide any further information and just minimal code examples, you will have to keep digging yourself . 既然你没有提供任何进一步的信息,只是最少的代码示例,您将不得不继续挖掘自己 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.