Displaying 1 result from an estimated 1 matches for "medias_name".
2007 May 25
1
how to update index with acts_as_ferret?
Hey all,
I have movie has_many :medias and media belongs_to :media
this is how my movie class looks like:
class Movie < ActiveRecord::Base
has_many :medias
acts_as_ferret :fields => [:title,:medias_name]
def medias_name
return self.medias.inject("") {|name,m| name + " " + m.name}
end
end
when I do Movie.find_by_contents("title:bob") it does return a movie
and if I modify that movie title to Bill and do
Movie.find_by_contents("title:bill") it will return...