From b5f7369441ea6053cb20666083e9032ca355e18d Mon Sep 17 00:00:00 2001 From: Sergey Moiseev Date: Mon, 26 Aug 2024 21:52:11 +0300 Subject: [PATCH 1/3] Add support for Pagy v9 --- app/views/components/_data_table.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/components/_data_table.html.erb b/app/views/components/_data_table.html.erb index cf83312..3f677a5 100644 --- a/app/views/components/_data_table.html.erb +++ b/app/views/components/_data_table.html.erb @@ -43,7 +43,7 @@ <%= form.hidden_field key, value: params[key] %> <%- end -%> <%= material_select name: 'per_page', form: form, id: 'per-page', options: per_page_options, - value: pagy.items, outlined: true, additional_classes: 'mdc-data-table__pagination-rows-per-page-select mdc-data-table__pagination-rows-per-page-select--outlined' %> + value: pagy.responds_to?(:items) ? pagy.items : pagy.limit , outlined: true, additional_classes: 'mdc-data-table__pagination-rows-per-page-select mdc-data-table__pagination-rows-per-page-select--outlined' %> <%- end -%>
From 0ad058ae52b40df9b33b848b457c5811c3a8ea92 Mon Sep 17 00:00:00 2001 From: Sergey Moiseev Date: Mon, 26 Aug 2024 21:52:48 +0300 Subject: [PATCH 2/3] Version up --- Gemfile.lock | 2 +- lib/turbo_material/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 00a036c..29a7e77 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - turbo_material (0.2.9) + turbo_material (0.2.10) importmap-rails (~> 2.0.1) rails (~> 7.1, >= 7.1.2) stimulus-rails (~> 1.3) diff --git a/lib/turbo_material/version.rb b/lib/turbo_material/version.rb index a4ac59e..731abfe 100644 --- a/lib/turbo_material/version.rb +++ b/lib/turbo_material/version.rb @@ -1,3 +1,3 @@ module TurboMaterial - VERSION = "0.2.9" + VERSION = "0.2.10" end From f463d7f772d03c945672648dfea550da6b0d44f7 Mon Sep 17 00:00:00 2001 From: Sergey Moiseev Date: Mon, 26 Aug 2024 21:54:09 +0300 Subject: [PATCH 3/3] Correction --- app/views/components/_data_table.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/components/_data_table.html.erb b/app/views/components/_data_table.html.erb index 3f677a5..b22e00f 100644 --- a/app/views/components/_data_table.html.erb +++ b/app/views/components/_data_table.html.erb @@ -43,7 +43,7 @@ <%= form.hidden_field key, value: params[key] %> <%- end -%> <%= material_select name: 'per_page', form: form, id: 'per-page', options: per_page_options, - value: pagy.responds_to?(:items) ? pagy.items : pagy.limit , outlined: true, additional_classes: 'mdc-data-table__pagination-rows-per-page-select mdc-data-table__pagination-rows-per-page-select--outlined' %> + value: pagy.respond_to?(:items) ? pagy.items : pagy.limit , outlined: true, additional_classes: 'mdc-data-table__pagination-rows-per-page-select mdc-data-table__pagination-rows-per-page-select--outlined' %> <%- end -%>