searchlogic
searchlogic copied to clipboard
using different conditions with associations and or doesnt work
Using searchlogic 2.4.2
Given a class class A < ActiveRecord::Base belongs_to :b end where b has attributes firstname and lastname
A.b_firstname_is_or_b_lastname_like('abc') throws the error "Searchlogic::NamedScopes::OrConditions::UnknownConditionError: The condition 'b_firstname_is' is not a valid condition
This is because when going through associations the last condition is always appened so it actually ends up trying to find 'b_firstname_is_like' even though the condtion of 'is' is already specified