Topic: Comments: create() for multiple classes

Hi,

I'm using acts_as_commentable for my application, I created a
Comments controller which saves the comments.

Now I have multiple classes that are commentable, but I'm not
sure how to distinguish the different classes in the Comments
create method.

A simple way would be to check obj.class, but I'm sure there is
something better for something like that?
I don't want an add_comment method in each controller..

thanks,
Christoph

Last edited by Christoph (2007-02-02 07:40:06)