09.09.2010 16:07, Bernhard Leicher wrote:
> On Sep 9, 4:00 pm, Joachim Bartosik <[email protected]> wrote:
>> Maybe I missed something but I don't understand what's wrong with
>> putting line like
>>
>>     attribute :boolean
>>
>> in fields?
> 
> That's what I did! Setting attribute to '' (Model#attribute='') then
> results in
> Model#attribute => nil
> Model#read_attribute(:attribute) => false
> When I save that record, false is saved to db, where I wanted nil to
> be saved.

So you need Boolean to store three values for you - {true, false, nil},
not just two of them - {true, false-or-nil}? Hmmm I never needed that so
I don't know ho to do this (other then writing your own type which is
probably BadIdea (tm) ).

Regards,
Joachim

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to