I have record in my db that is a boolean field (true/false).
The field is archived. When archived is true all these work great to output true:
Rails.logger.info @commentable.archived
Rails.logger.info @commentable.archived?
Rails.logger.info !!@commentable.archived?
BUT when the archived is false, it outputs nothing for either of the above. How can I get an output of false when the field is FALSE?
Thanks
Try
.to_son the field?