From 7ddfdff7c45a7f4a198fcc1d65384d5888a50c69 Mon Sep 17 00:00:00 2001 From: echarp Date: Mon, 30 Dec 2019 21:39:40 +0100 Subject: [PATCH] Quick correction on orgas infinite paging --- app/controllers/orgas_controller.rb | 2 ++ app/views/orgas/index.html.haml | 1 + 2 files changed, 3 insertions(+) diff --git a/app/controllers/orgas_controller.rb b/app/controllers/orgas_controller.rb index 4c73e768..746aa37f 100644 --- a/app/controllers/orgas_controller.rb +++ b/app/controllers/orgas_controller.rb @@ -13,6 +13,8 @@ class OrgasController < ApplicationController @search = @unfiltered_orgas.ransack params[:q] @search.sorts = 'updated_at desc' if @search.sorts.empty? @orgas = @search.result.page params[:page] + + respond_to :html, :json end # GET /orgas/new diff --git a/app/views/orgas/index.html.haml b/app/views/orgas/index.html.haml index 92b1a113..5a083d19 100644 --- a/app/views/orgas/index.html.haml +++ b/app/views/orgas/index.html.haml @@ -13,6 +13,7 @@ :region_name, Orga.human_attribute_name(:region) %th.updated_at= sort_link @search, :updated_at + %tbody - @orgas.each do |orga| %tr{ class: orga.active ? 'active' : 'inactive' }