On this page
class ActiveRecord::Type::Boolean
Active Model Boolean Type
A class that behaves like a boolean type, including rules for coercion of user input.
"false"
,"f"
,"0"
,0
or any other value inFALSE_VALUES
will be coerced tofalse
.Empty strings are coerced to
nil
.All other values will be coerced to
true
.
Constants
- FALSE_VALUES
© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.