
Model.search results nil if combined with named_scope
Reported by Georg Ledermann | July 6th, 2009 @ 12:22 PM
It seems there is something going wrong with the "search" method:
class Kase < ActiveRecord::Base
named_scope :foo, :conditions => { :status => 'foo' }
end
>> Kase.number_equals(123).foo
=> [] # OK!
>> Kase.search(:number_equals => 123).foo
=> nil # WRONG!
>> Kase.foo.search(:number_equals => 123)
=> #<Searchlogic::Search:... # OK!
I'm using Rails 2.3.2 and latest searchlogic v2
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Provides common named scopes and object based searching.