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
-~----------~----~----~----~------~----~------~--~---