What you really need is polymorphic associations.

But you can also just get a plugin with the code already implemented -
http://github.com/jackdempsey/acts_as_commentable/tree/master


-
Maurício Linhares
http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr



On Fri, Jun 26, 2009 at 3:09 PM, Toushi<inferno.desig...@gmail.com> wrote:
>
> Hello,
> I am building a project management application, and I want my clients
> to be able to comment on multiple things.
> For instance I have 2 models: milestones, and tickets, I have the
> foreign keys for both of them in the comments model and linked them
> with has_many and belongs_to. I am just wondering if this is possible?
> Or if there is a better way to do it.
>
> Thanks,
> Ben.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to