ruby on rails - Kaminari and Sunspot undefined method page -


i trying return records match search in kaminari , paginate results. however, getting following error:

undefined method 'page' 

my controller code:

@search = sunspot.search(building) fulltext params[:search] end @buildings = @search.results.page(params[:page]).per(15) 

i think not understanding how use kaminari?

page method can call in relation, can this:

@buildings = building.where(id: @search.results.map(&:id)).page(params[:page]).per(5) 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -