Open jmaniv opened 14 years ago
i have the exact same issue. ie i write..
Product.search(:descr_equals => "test").all and it returns nil
while Product.descr_equals("test").all returns the collection as normal
Rails 2.3.8, Ruby 1.8.7
update: my bad, i had a named_scope in my model called :all which was empty ... :P
I have install searchlogic then tried in ruby script/console
search=BankingDetail.search(:name_like_all=>"man") search.all
i got error when i call 'all' method
NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[]