I have created a Boolean field like
table.boolean :log_status, :default => 0, :null => false
When i try to add log_status in my controller part, by default the value
is assigned as 1.
I dont know why it is?
I aslo assigned the value as zero explicitly, like
@log = LogSettings.new
@log.log_status = 0
but even after hard coding like this, the log_status field is added as 1
could any anyone please suggest on why its so?
In mysql the field is created as
Field Datatype Null Default
‘log_status’, ‘tinyint(1)’, ‘NO’, ‘’, ‘0’, ‘’
Thanks in advance