# Conditions are not working

**URL:** <https://www.ruby-forum.com/t/conditions-are-not-working/141427>\
**Category:** Ferret\
**Created:** [June 25, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/conditions-are-not-working/141427 "2008-06-25T19:26:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![df-sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@df-sean](https://www.ruby-forum.com/u/df-sean)\
**Post date:** [June 25, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/conditions-are-not-working/141427/1 "2008-06-25T19:26:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![df-sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@df-sean](https://www.ruby-forum.com/u/df-sean)\
**Post date:** [June 26, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/conditions-are-not-working/141427/2 "2008-06-26T19:31:42Z")

</div>

Fixed my problem (there was a missing empty options hash

> > Asset.find\_with\_ferret(“smoke”, {}, :conditions =\> [“identifier = ?”, “F”])
