binarylogic / searchlogic

Searchlogic provides object based searching, common named scopes, and other useful tools.

Home Page:http://rdoc.info/projects/binarylogic/searchlogic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

release 2.4.24 broken - UnknownConditionError

fuzziness opened this issue · comments

The condition 'description_like_before_type_cast' is not a valid condition, we could not find any scopes that match this.
Extracted source (around line #16):


13: <ul>
14: <li>
15: <span>
16: <%= form.input :name_or_description_like, :label => 'articolo',
17: :label_html => {:class => 'desc'},
18: :hint => 'codice o descrizione',
19: :wrapper => false, :required => false %>

Are you sure you're using 2.4.24? I believe the latest release fixes this.

yepp... just tried to rolling back to 2.4.23 an all works fine (rails 2.3.8 - ruby 1.8.7)

I have the same issue with 2.3.8 and 1.8.7 and reverting to 2.4.23 solved it.

I'm having the same problem. Rolling back to 2.4.23 does solve the problem.

The issue seems to be that Search.respond_to?() was added in 2.4.24 (SHA: 21770e9) but the respond_to?() calls interpolate_or_conditions() which raises an UnknownConditionError rather than returning false when it's passed an invalid "or condition".

I was able to reproduce it in the console with
User.search().or_condition?('foo_or_bar_like')

this is fixed in 2.4.26, thanks for the help