Displaying 1 result from an estimated 1 matches for "post_com".
Did you mean:
post_code
2006 Jul 21
3
acts_as_ferret with has_many relationship
...Ferret and the acts_as_ferret plugin, I would like to retrieve
results based on models descended from a parent model:
class Post < ActiveRecord::Base
acts_as_ferret :fields => [ ''title'',
''body'',
:post_author,
:post_comments
]
...
has_one :author
has_many :comments
end
I would like to search all comments of a post and retrieve Post models
as search results. Currently, searching across :author fields is
achieved using:
def post_author
self.author.name
end
However, a similiar technique does...