# Problem with acts\_as\_commentable plugin

**URL:** <https://www.ruby-forum.com/t/problem-with-acts-as-commentable-plugin/140238>\
**Category:** Rails\
**Created:** [June 12, 2008, 6:40am UTC](https://www.ruby-forum.com/t/problem-with-acts-as-commentable-plugin/140238 "2008-06-12T06:40:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![infinit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/76d3ee/32.png) [@infinit](https://www.ruby-forum.com/u/infinit)\
**Post date:** [June 12, 2008, 6:40am UTC](https://www.ruby-forum.com/t/problem-with-acts-as-commentable-plugin/140238/1 "2008-06-12T06:40:53Z")

</div>

Hi,

I added a comment model in app/models, and when I execute the  
following code:comment.commentable, the following error occurs  
NoMethodError: undefined method `commentable’ for #\<Comment…  
.  
But when I delete the comment model, it’s ok.

When add another comment model in app/models, will it override the  
default comment model provided by the plugin or just open the comment  
class?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![infinit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/76d3ee/32.png) [@infinit](https://www.ruby-forum.com/u/infinit)\
**Post date:** [June 12, 2008, 6:50am UTC](https://www.ruby-forum.com/t/problem-with-acts-as-commentable-plugin/140238/2 "2008-06-12T06:50:50Z")

</div>

Rails will stop looking in its path once a constant is loaded, so you  
can’t open classes like that without a little extra effort. Your best  
bet is to either (a) hack the plugin or (b) copy the plugin’s model  
into app/models.

–Jeremy

On Thu, Jun 12, 2008 at 12:36 AM, Infinit [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> default comment model provided by the plugin or just open the comment  
> class?
> 
> Thanks for your help.
> 
> >

–  
[http://jeremymcanally.com/](http://jeremymcanally.com/)  
[http://entp.com](http://entp.com)

Read my books:  
Ruby in Practice ([Ruby in Practice](http://manning.com/mcanally/))  
My free Ruby e-book ([http://humblelittlerubybook.com/](http://humblelittlerubybook.com/))

Or, my blogs:

> **[Site not found · DreamHost](http://mrneighborly.com)**
>
> The owner of this domain has not yet uploaded their website.

[http://rubyinpractice.com](http://rubyinpractice.com)
