Is there anything wrong with defaulting a boolean field to nil rather than false with an ActiveRecord migration for use with Postgres?
I like how it gives a small bit of extra data- whether or not that field has been marked as true or false yet.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
there is nothing to stop you from using nil on boolean – but I personally like my booleans to be true or false, i’ve found that having nil can lead to some ugly code