On 3 April 2010 04:16, Jason Newport <[email protected]> wrote:
> So I put this in my controller:
> logger.debug "Person attributes hash: #...@user_interests.inspect}"
>
>
> And got this:
> Person attributes hash: [#<Interest id: 6, user_id: 5, post_id: 1,
> created_at: "2010-04-01 23:52:53", updated_at: "2010-04-01 23:52:53">,
> #<Interest id: 7, user_id: 5, post_id: 2, created_at: "2010-04-01
> 23:53:08", updated_at: "2010-04-01 23:53:08">]
>
> Shouldn't it be the interest.post info for each interest, not just the
> model attributes for the interest table?

Inspect will only show you the array of Interest objects, which is
what you have in @user_interests, it does not dive down into the
relationships.

Colin

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