Forum: Ferret Conditions are not working

6e0df11a3326dfcf8e81f05ffd3f5502?d=identicon&s=25 Sean Schofield (schof)
on 2008-06-25 19:26
My conditions do not seem to be having no effect on the ferret search.
The search results are correct (they return the right values based on my
search terms) but they are not limiting the results as I would expect.

class Asset < ActiveRecord::Base
  acts_as_ferret :fields => [:identifier, :description]
end

>> Asset.find_with_ferret("smoke", :conditions => ["identifier = ?", "F"])


I am using the stable version of plugin and the latest gem.  I am also
using Rails 2.1.

If I could get simple conditions working I would also like to use
:include to join another model and further limit my records.  Any idea
if that is possible?

TIA,

Sean
6e0df11a3326dfcf8e81f05ffd3f5502?d=identicon&s=25 Sean Schofield (schof)
on 2008-06-26 19:31
Fixed my problem (there was a missing empty options hash

>> Asset.find_with_ferret("smoke", {}, :conditions => ["identifier = ?", "F"])
This topic is locked and can not be replied to.