# Using searchlogic with acts\_as\_taggable\_on

**URL:** <https://www.ruby-forum.com/t/using-searchlogic-with-acts-as-taggable-on/190629>\
**Category:** Rails\
**Created:** [June 24, 2010, 8:57am UTC](https://www.ruby-forum.com/t/using-searchlogic-with-acts-as-taggable-on/190629 "2010-06-24T08:57:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/fbc32d/32.png) [@cpx](https://www.ruby-forum.com/u/cpx)\
**Post date:** [June 24, 2010, 8:57am UTC](https://www.ruby-forum.com/t/using-searchlogic-with-acts-as-taggable-on/190629/1 "2010-06-24T08:57:17Z")

</div>

Hi,

i have 2 model, Merchant and Items and using acts\_as\_taggable\_on  
Merchant has\_many Items, and i try to find Merchant with search logic  
including the tags

class Merchant \< ActiveRecord::Base  
acts\_as\_taggable

has\_many :items  
end

class Item \< ActiveRecord::Base  
acts\_as\_taggable

belongs\_to :merchant  
end

This works

> > Merchant.tagged\_with(‘Tag 1’)

but this doesn’t

> > Merchant.tagged\_with\_or\_name\_like(‘Tag 1’)  
> > Searchlogic::NamedScopes::OrConditions::UnknownConditionError: The  
> > condition ‘tagged\_with’ is not a valid condition, we could not find  
> > any scopes that match this.

Can anybody help me with this ?

Thanks
