#97 ✓resolved
Georg Ledermann

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

Comments and changes to this ticket

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.

New-ticket Create new ticket

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.

People watching this ticket

Pages