Forum: Ferret Grabbing names from main table foreign keys

Posted by Paul Walksalong (walksalong)
on 2008-07-18 20:08
I have a table being searched by ferret called expenses. In the expenses
table I have a person_id and project_id field that links to the people
and projects tables. How do I specify in acts_as_ferret to search for
the linked people and projects associated within expenses?

I tried something like this:

acts_as_ferret :additional_fields => [:person_name]

  def person_name
    people.collect { |person| person.name }.join ' '
  end

But no luck.

Thanks!
Paul
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.