[英]rails: is “pollresponse” a magic keyword that is not allowed in query string?
Spent an hour debugging an "impossible" situation, where a query string pollresponse=true was simply not being recognized. 花了一个小时来调试“不可能”的情况,在该情况下根本无法识别查询字符串pollresponse = true。
Basically, params[:pollresponse] seems to always be nil, even when the params hash clearly shows { 'pollresponse' => 'true' } 基本上,params [:pollresponse]似乎总是为零,即使params哈希清楚显示了{'pollresponse'=>'true'}
On a hunch, replaced it with another name and it worked as expected. 直觉上,将其替换为另一个名称即可正常工作。
So I assume there is something "magic" though googling "rails pollresponse" didn't give me anything obvious. 因此,我认为尽管搜索“ rails pollresponse”并没有给我带来任何明显的印象,但还是有一些“魔术”。
a) Is it in fact reserved and therefore illegal as a query param? a)它实际上是保留的,因此作为查询参数是非法的吗?
b) is there a list of other such reserved words which, if used as a query string param, will be ignored? b)是否有其他此类保留字的列表,如果将其用作查询字符串参数,将被忽略?
a) no, there is no magic keyword pollresponse for rails. a)不,没有关于rails的魔术关键字pollresponse。
b) make sure b)确保
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.