I’ve been working on a specific project for longer than I like to
think about. At some point, I had ferret working in such a way that it
would search fields in the HABTM relationship. Now, though, it only
searches fields in the specific model where the search is located. The
application is structured like this:
provider is where the search in question is located. Thus, it is at
http://localhost:3000/provider/search/. A provider
has_and_belongs_to_many procedures, types, and destinations. Thus,
when I search at the above URL, I want my search to take values that
correspond to those models, as well as the provider model.
- acts_as_ferret :additional_fields => [
- has_and_belongs_to_many :types, :join_table =>
- has_and_belongs_to_many :procedures, :join_table =>
- has_and_belongs_to_many :destinations, :join_table =>
- def procedure_name
- def type_name
- def type_field
- def destination_name
Thus, I defined the additional fields which I would like ferret to
index. It was doing this perfectly until recently, and I have tried
rebuilding the indexes of the above models and tried various other
small edits, but nothing has helped thus far.
Any ideas would be most appreciated. Thanks.