yes as per first reply you should have has_many and belongs_to relationship
between user and post.

user has_many posts
post belongs_to user

so that you can get post.user.name etc.

On Wed, Apr 14, 2010 at 9:52 AM, kannav rajeev <[email protected]>wrote:

> user has_many Post .
> post has_one user .
>
>
> On Mon, Apr 12, 2010 at 11:18 AM, Priyanka Pathak <[email protected]>wrote:
>
>> Hi,
>>      As you want to display owner of post next to the post. Use
>> post.user.name to display owner of the post. I think there is one to
>> many relation exist between user & post model.
>> --
>> 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.
>>
>>
>
>
> --
> Thanks:
> Rajeev sharma
>
>
>  --
> 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.
>

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