Using Rails & Kaminari gem, I am getting the below error when I render my view:
undefined method `total_pages' for #Array:0x007faa486583e0
controller:
def index
@user = current_shop.users.new
@users = current_shop.active_users ### This returns an array
Kaminari.paginate_array(@users).page(params[:page]).per(10)
end
view:
<tbody>
<%= paginate @users %>
<% @users.each do |user| %>
<%= render 'user_table_row', :user=> user %>
<% end %>
</tbody>
What am I doing wrong?