class Boolean
Ruby on Rails edge
Since v5.1.7A class that behaves like a boolean type, including rules for coercion of user input.
-
‘“false”`, `“f”`, `“0”`,
0or any other value inFALSE_VALUESwill be coerced tofalse. -
Empty strings are coerced to
nil. -
All other values will be coerced to
true.