Acts_as_ferret; one search over multiple models??

Jon,

  > not figured out how to create one search over all my models.

It's not that hard to write :    results = Book.find_by_contents(query) + Disk.find_by_contents(query)

If you really have loads of models to search through, you could write something like (untested) :

MODELS=%w(Book Disk Person Animal Article Page Concert Joke Story) results = MODELS.collect{|klass|      klass.constantize.find_by_contents(query) }.flatten

Alain

You could also always make a model that covers them all through methods, using the ability to point acts as ferret at other fields.

Example:

class Order < ActiveRecord::Base # ( or not even maybe.. )   belongs_to :reservation   belongs_to :customer   acts_as_ferret :remote => true, :additional_fields => [ :reservation_to_s, :customer_to_s ]

  def reservation_to_s    self.reservation.to_s # assuming you defined it   end   def customer_to_s     self.customer.to_s # ditto   end end

Just one option... of many.

D. Taylor Singletary, Reality Technicians