Owain wrote:
> I am preparing some seed data for a deployment from generated a CSV
> file.  However, one of the model's columns ( child_id) needs to have a
> null value in on a few of the rows where there is no Child instance.
> Whatever I have put in there, it seems to just come in as a zero.
> 
> I have tried several combinations since I cannot find this documented
> anywhere.
> 
> column1, child_id, column2
> a,,b        gives |a|0|b|
> a, null, b gives |a|0|b|
> a, "", b    gives |a|0|b|
> a, nil, b   gives  |a|0|b

Check your table schema to see if child_id has a default value 
configured.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to