I searched everywhere, and I am wondering if I am doing something wrong. And just to check, I will ask you guys!
So, I get paramsin a Rails controller. One pair key, value :status => true/false. However, I find that when I try to publish statusas a string, for example
:status => "THIS IS NOT A BOOLEAN"
and create my object in my controller, the attribute of :statusmy object will become false.
Therefore, is there any clean way in the rails to confirm that mine is :statuslogical?
Thank!
source
share