Topic: Question about nil in rails 3.2

In Rails 3.2, if my attribute in a model is nil and I call it say..

user.name

I get an exception that the attribute isn't there.

In the previous version of rails, it returned nil.

Do we have to check of the behavior by calling user.name?

Re: Question about nil in rails 3.2

Can you give an example of when you get that error? I'm still seeing nil errors if I try to do something with a nil attribute. What do you get if you do

user.name.nil?

Re: Question about nil in rails 3.2

I get the following

1.8.7-p358 :008 > mi.usda_common_name
ActiveModel::MissingAttributeError: missing attribute: usda_common_name
  from (irb):8
1.8.7-p358 :009 > mi.usda_common_name?
 => false 
1.8.7-p358 :010 > mi.usda_common_name.nil?
ActiveModel::MissingAttributeError: missing attribute: usda_common_name
  from (irb):10
1.8.7-p358 :011 > 

What is the best practice for a nil in a db field?