ActiveRecord uses confusing defaults

Jeroen Houben
Fri, 08 Sep 2006 11:47:41 -0000

Hi!

I have an AR model called Submission
In my submissions table (mysql 5) I have a column called postcode
(varchar, not null) and a column street (varchar, not null)

s = Submission.new
s.postcode # => 0

now I would expect this to return nil

s.street # => ''''
I would expect this to return nil

Is there a reason for this?

Jeroen