开发者

What form param values can be used for TRUE in a ruby on rails app with mysql db for a BOOLEAN field?

开发者 https://www.devze.com 2022-12-17 01:46 出处:网络
when contructing a http form parameter for a Boolean, what value ca be used to represent true? That is, ruby on rails database开发者_C百科 field set to BOOLEAN for a mysql database.A value of 1 will

when contructing a http form parameter for a Boolean, what value ca be used to represent true?

That is, ruby on rails database开发者_C百科 field set to BOOLEAN for a mysql database.


A value of 1 will evaluate to true and 0 will evaluate to false.

A good little reference/example is available here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号