Thanks, Tim

Actually, and I haven't fully tested this out yet, I think it's
simpler than that. Currently, I hvae the following:

class Comment < ActiveRecord::Base
  belongs_to :user
  belongs_to :commentable, polymorphic => true
...
end

and that seems to be working. I have another issue now that I'll
outline in a subsequent email.

Best,

Mike


On Feb 3, 10:28 pm, Tim Shaffer <[email protected]> wrote:
> Sounds like you could just add a "belongs_to :user" to the Comment class.
>
> But since you already have "comments" on the user, you'll need to give the
> reverse association another name. Perhaps "comments_owned"
>
> So add "has_many :comments_owned, :class_name => Comment" to User.

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