# Trying to index comments with acts\_as\_ferret and acts\_as\_commentable

**URL:** <https://www.ruby-forum.com/t/trying-to-index-comments-with-acts-as-ferret-and-acts-as-commentable/130442>\
**Category:** Rails\
**Created:** [February 28, 2008, 9:29am UTC](https://www.ruby-forum.com/t/trying-to-index-comments-with-acts-as-ferret-and-acts-as-commentable/130442 "2008-02-28T09:29:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierrederome](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c67d28/32.png) [@pierrederome](https://www.ruby-forum.com/u/pierrederome)\
**Post date:** [February 28, 2008, 9:29am UTC](https://www.ruby-forum.com/t/trying-to-index-comments-with-acts-as-ferret-and-acts-as-commentable/130442/1 "2008-02-28T09:29:06Z")

</div>

i have a model that is commentable. I want to index the comments with  
ferret like so:

acts\_as\_commentable  
acts\_as\_ferret :fields =\>  
[:title, :tag\_list, :description, :pseudo, :assetcomment]  
def assetcomment  
self.comments.each { |c|  
comment \<\< c.comment  
}  
return comment  
end

it won’t index anything.

If however, I change to:  
def assetcomment  
return self.comments[0].comment  
end

it will index the first comment.  
I’ve deleted the index folder and so on…

I’ve been going circles and googling for a while on this, any advice  
would be much appreciated…
