Topic: Making pagination works faster even with huge size of data
Im refactoring code since in the future it will handle large data now the problem is How can I make the pagination works it may seem it works but it handle array that can be huge size. It will make big trouble with bigger data
@rankings = Rank.search_word(params[:keyword]).by_table_area(params[:table_areas]).by_table_spot(params[:table_spots])
@search_count = @rankings.count
@rankings = @rankings.paginate(:per_page => PER_PAGE,:page => params[:page])
@ rankings = PlayerRankings . all.paginate ( : per_page => PER_PAGE , : page => params [ : page ])
All this is in controller..