From d3e73b103f6dcfca02931fbd14469c528dc3c8f1 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Mon, 16 Mar 2020 16:48:17 -0700 Subject: [PATCH 1/5] Document workaround for jbox-web/ajax-datatables-rails#293 --- app/datatables/user_datatable.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/datatables/user_datatable.rb b/app/datatables/user_datatable.rb index ab0e877f..3b3e1197 100644 --- a/app/datatables/user_datatable.rb +++ b/app/datatables/user_datatable.rb @@ -47,10 +47,12 @@ class UserDatatable < AjaxDatatablesRails::Base end # rubocop:enable Naming/AccessorMethodName + # Workaround for jbox-web/ajax-datatables-rails#293 def records_total_count fetch_records.unscope(:group).count(:all) end + # Workaround for jbox-web/ajax-datatables-rails#293 def records_filtered_count filter_records(fetch_records).unscope(:group).count(:all) end From 4182b6fb8f7f96b2dd34eb670fc7821a38718de1 Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Sat, 4 Apr 2020 10:06:20 -0700 Subject: [PATCH 2/5] Fix bug in UserDatatable query affecting PostgreSQL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: $ docker-compose run --rm osem bundle exec rspec ./spec/datatables/user_datatable_spec.rb:97 … ActiveRecord::StatementInvalid: PG::GroupingError: ERROR: column "users.id" must appear in the GROUP BY clause or be used in an aggregate function --- app/datatables/user_datatable.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/datatables/user_datatable.rb b/app/datatables/user_datatable.rb index 3b3e1197..b97eb404 100644 --- a/app/datatables/user_datatable.rb +++ b/app/datatables/user_datatable.rb @@ -49,12 +49,12 @@ class UserDatatable < AjaxDatatablesRails::Base # Workaround for jbox-web/ajax-datatables-rails#293 def records_total_count - fetch_records.unscope(:group).count(:all) + fetch_records.unscope(:group, :select).count(:all) end # Workaround for jbox-web/ajax-datatables-rails#293 def records_filtered_count - filter_records(fetch_records).unscope(:group).count(:all) + filter_records(fetch_records).unscope(:group, :select).count(:all) end # ==== These methods represent the basic operations to perform on records From 4e6c74ecb5e81969ec09b49728c70d3428550729 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Fri, 22 May 2020 20:50:27 +0000 Subject: [PATCH 3/5] Update puma to version 3.12.6 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 81a6be64..e36e18ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -378,7 +378,7 @@ GEM method_source (~> 0.8.1) slop (~> 3.4) public_suffix (3.1.1) - puma (3.12.4) + puma (3.12.6) rack (2.0.8) rack-openid (1.3.1) rack (>= 1.1.0) From acb3654af2e7f4004822dc734877ce231a14e43b Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2020 18:44:31 +0000 Subject: [PATCH 4/5] Update websocket-extensions to version 0.1.5 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 81a6be64..06663fdd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -602,7 +602,7 @@ GEM hashdiff websocket-driver (0.7.1) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) + websocket-extensions (0.1.5) whenever (0.10.0) chronic (>= 0.6.3) xpath (3.2.0) From 3a3c0e6f2f49a00315d56c0528ed3bfd7170c72d Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 20 Jun 2020 02:10:35 +0000 Subject: [PATCH 5/5] Update rack to version 2.1.4 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 51cc5e86..27ec514a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -379,7 +379,7 @@ GEM slop (~> 3.4) public_suffix (3.1.1) puma (3.12.6) - rack (2.0.8) + rack (2.1.4) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8)