On Nov 6, 10:31 pm, Mark Lohstroh <[email protected]> wrote:
> yeah, the @post.user_ids actually is a typo. i tried editing it but it
> looks like that didn't work... it really is just @post.user_id which is
> the user id that the post belongs to. I was using the debugger before i
> was saving the @user, and the @user.variable was different. but when i
> saved it nothing would save. The reason i'm confused is that the post
> will updates its likes but the user won't updates its variable.

@post.user_id wouldn't work either - that's just an integer and won't
have all the attributes your models have. It's also really helpful if
the code posted here is actually what's in your app, if there are
typos here that aren't in your app (and vice versa) it can be nearly
impossible to work out what is going on.

Fred
>
> --
> Posted viahttp://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.

Reply via email to