Record.attribute = nil


#1

am i missing something obvious about ar, or is there no clear way to
do this:

record.attribute = nil

or equivalent to set an attribute to ‘NULL’ ??

thanks.

a @ http://drawohara.com/

we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama


#2

ara.t.howard wrote:

am i missing something obvious about ar, or is there no clear way to
do this:

record.attribute = nil

or equivalent to set an attribute to ‘NULL’ ??

thanks.

a @ http://drawohara.com/

we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama

how is the record.column defined? (if it is defined as ‘not null’ then
presumably, you won’t be able to define the attribute as null/nil)

how did you create the db-table? via rake / migrations / sql hand
creation / ?