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.
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 [email protected] wrote:
default comment model provided by the plugin or just open the comment
class?
Thanks for your help.
–
http://jeremymcanally.com/
http://entp.com
Read my books:
Ruby in Practice (Ruby in Practice)
My free Ruby e-book (http://humblelittlerubybook.com/)
Or, my blogs:
http://rubyinpractice.com