Paul wrote: > Hi Neil, > I think I am having exactly this problem and I was wondering if you > could tell me what you mean by "I finally fixed this by creating my > own commentable associations." ? > > In my app, I have events and users, both of which act_as_commentable. > When I try to load comment.user.avatar (<-- an act_as_attachment > image) I get the undefined method error (in my case 'avatar'). > > > thanks > > Paul > > > > On Apr 6, 12:49 pm, Neil Cauldwell <[EMAIL PROTECTED]>
Hi Paul It's been ages since I fixed this and I'm not even using polymorphic comments anymore. However, I believe the problem was fixed by simply creating my own polymorphic comments and dropping the plugin altogether. This is pretty easy to do. Just run the migration, create the comment model, set up the associations between the user and the comment, and that's it. The plugin (something to do with it being loaded as a plugin and a separate module, presumably) seemed to break the associations that belonged to the user. Hope that helps -- 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 -~----------~----~----~----~------~----~------~--~---

