0
J'effectue une recherche d'élasticité multi-modèle dans mon contrôleur et je n'ai pas réussi à obtenir les résultats pour paginer avec la gemme will_paginate
.Pagination pour MultiModel elasticsearch
Dans mon contrôleur je:
def index
@people = Elasticsearch::Model.search('*', [Authors, Editors])
end
Alors à mon avis j'ai:
<table>
<thead>
<tr>
<th>Name</th>
</tr>
</thead>
<tbody>
<% @people.each do |person| %>
<tr>
<td><%= person.name %></td>
</tr>
<% end %>
</tbody>
</table>
<%= will_paginate @people, renderer: BootstrapPagination::Rails %>
La principale erreur qui continue à recevoir est undefined method 'total_pages' for #<Array:0x007fd8b0e32660>
.
En utilisant Kaminari ... will_paginate il est obsolète –