I have a boolean column called ended. Recently I have changed it to not allow null value, so determining whether it is false will be easier.
However I realized quite a number of places relied on auto casting nil to false. If the object was null it would auto convert to false. After this migration if the object is null then error will occur.
eg:
params.merge!({
ended: nokogiri_doc.at_css('.foo')
})
I don't want to manually add .present? to each of these statements. Is it possible to preserve the auto conversion when having a null:false column (not allowing null value)?