To clarify, say your Author class has the fields, 'first_name' and
'surname'. To have these indexed by the Book class you would need to do
some things:
1) Create methods in Book.rb to access these fields:
def author_first_name
return author.first_name
end
def author_surname
return author_surname
end
2) Pass these fields as options to the call to acts_as_ferret:
class Book < ActiveRecord::Base
acts_as_ferret :additional_fields => ['author_first_name',
'author_surname']
belongs_to :author
end
I'm not sure it there's a more elegant solution, but that should do the
trick.
Pete.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk