Well while investigating about this issue I found that searchlogic v2 
does not include that method anymore. It works in a diferent way. More 
info about this can be found at:

http://www.binarylogic.com/2009/06/09/searchlogic-v2-beta-released/
http://github.com/binarylogic/searchlogic/tree/v2

In other words, that usage is deprecated as I underestood. The thing is 
I couldn't find out how to use modificators of the previous version. 
Maybe writing your own name_scopes thought.

Pablo Gonzalez wrote:
> I got the same problem:
> 
> undefined method `new_search'
> 
> I am using this code
> 
>     @busqueda1 = Establecimiento.new_search(
>       :conditions =>{
>          :titulo_or_descripcion_like_any => params[:busqueda].split
>       },
>       :per_page => per_page,
>       :page => params[:page]
>     )
>     @establecimientos = @busqueda.all
> 
> I installed will_paginate and pagination does not cause error, but 
> new_search method still doesn't work.
> 
> Has anyone figured out how to solve it?
> 
> Joe Peck wrote:
>> Hey,
>> 
>> I just upgraded from searchlogic-1.6.6 to searchlogic-2.1.1, and now I'm
>> getting some new errors.
>> 
>> Previously, in the model I could have something like this:
>> 
>> def self.search(criteria, options={})
>>     criteria ||= {}
>> 
>>     search = self.new_search
>> 
>>  blah blah blah
>> end
>> 
>> and it would work.  Now, I'm getting this error whenever it tries to
>> call that method:
>> undefined method `new_search' for #<Class:blahblah>
>> 
>> Anyone run into this before, or have ideas on how to resolve this?
>> Thankee in advance.

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to