It's not normal
try reboot your server

check in DB if user_id is null

try Post.first.user.name


2010/12/12 Ast Jay <[email protected]>

> Hi Fred, thanks for the reply.
>
> In the rails console with 'post.user' I get:
>
> NoMethodError: undefined method `user' for #<Post:0x00000101455590>
>
> And in my view 'post.user.nameI get:
>
> undefined method `name' for nil:NilClass
>
> If I leave off '.name' I get what looks like an object:
>
> <User:0x000001031f4470>
>
> --
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
Rodrigo Mendonça
(62) 8567-3142

-- 
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