I have a normal class (Event) where a boolean value is defined as
attr_accessible :archived
and in the db schema is
t.boolean "archived", :default => false
As such, the default method archived? is automatically defined.
After a debugging session I discovered this
>> a=Event.last
>> a.archived
false
>> a.archived=true
true
>> a.archived
true
>> a.archived?
false
Should't the last two values BOTH be true? What am I missing here?
Even this is not helping:
>> a.save
(0.1ms) begin transaction
(45.2ms) UPDATE "events" SET "archived" = 't', "updated_at" = '2012-12-10 06:31:57.410990' WHERE "events"."id" = 3
true
(149.5ms) commit transaction
>> a.archived?
false
Thank you in advance