Why are you raise''ing? You can just do puts.
Try puts @person.created_at.inspect
On Jan 8, 2008 11:58 AM, OnRails
<zzzlai-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:
>
> 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 raise-H7LnPrieQlmJyyJfPC+BzA@public.gmane.org_at.inspect and
> raise-bBCv5x5Hm30aSwR9sru3fA@public.gmane.org_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!
> >
>
--
Ryan Bigg
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---