[英]Rails: JSON URL returning HTML
I have a Rails 4 application, and the URL localhost:3000/resources.json returns and HTML file, instead of JSON. 我有一个Rails 4应用程序,URL localhost:3000 / resources.json返回了HTML文件,而不是JSON。 The index.json.jbuilder is generated by Rails scaffold itself.
index.json.jbuilder由Rails支架自身生成。 Any idea why the JSON output is going wrong?
知道为什么JSON输出出错吗?
Thought I will answer this question myself based on further searches. 以为我会根据进一步的搜索本人回答这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.