Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support polymorphic commenter #61

Open
rcanand opened this issue Dec 9, 2014 · 2 comments
Open

Support polymorphic commenter #61

rcanand opened this issue Dec 9, 2014 · 2 comments

Comments

@rcanand
Copy link

rcanand commented Dec 9, 2014

Currently, acts_as_commentable assumes a single (user) model. I would like to make the user association polymorphic, so that, for example, I can have user or admin model add comments. This may also induce adding an acts_as_commenter, which would reside in the commenter models (like User or Admin).

@jackdempsey
Copy link
Owner

Can you think of a way to do this without breaking backwards compatibility? I look at all patches if you have something to propose.

@Ganasist
Copy link

Would it be possible to apply something like this to User / Admin models?

has_many :comments, as: :commenterable, dependent: :destroy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants