Why I can't get the date value?

On rails 2.0.2, I debug:
raise @person.inspect
I got:
#<Person id: 102, created_at: “2006-08-16 00:37:50”, updated_at:
“2008-01-07 10:46:49”, points_count: 0>

raise @person.id.inspect
I got
“102”
raise @person.points_count.inspect
I got
“0”

but when I use [email protected]_at.inspect and
[email protected]_at.inspect
I got same error:
You have a nil object when you didn’t expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]

why? and the date type is different in rails 1.2.6 and 2.0.2?
who can help me? Thanks!

Why are you raise’ing? You can just do puts.

Try puts @person.created_at.inspect

On Jan 8, 2008 11:58 AM, OnRails [email protected] wrote:

raise @person.points_count.inspect

why? and the date type is different in rails 1.2.6 and 2.0.2?
who can help me? Thanks!


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.