From ad56fe61af11e2716ce440e5344368a4620b4228 Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Fri, 15 Nov 2024 20:46:15 +0100 Subject: [PATCH 1/3] Update lib/datagrid/core.rb Co-authored-by: Bohdan Zhuravel --- lib/datagrid/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/datagrid/core.rb b/lib/datagrid/core.rb index 8bc04d8..ddc450c 100644 --- a/lib/datagrid/core.rb +++ b/lib/datagrid/core.rb @@ -273,7 +273,7 @@ def sanitize_for_mass_assignment(attributes) if forbidden_attributes_protection super elsif defined?(ActionController::Parameters) && attributes.is_a?(ActionController::Parameters) - attributes.permit!.to_h + attributes.to_unsafe_h else attributes end From 6fab0e8c07705c1a694aad3ebc9aa3e528b20ecf Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Fri, 15 Nov 2024 20:46:33 +0100 Subject: [PATCH 2/3] Update app/views/datagrid/_row.html.erb Co-authored-by: Bohdan Zhuravel --- app/views/datagrid/_row.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/datagrid/_row.html.erb b/app/views/datagrid/_row.html.erb index f57c729..c64b0bf 100644 --- a/app/views/datagrid/_row.html.erb +++ b/app/views/datagrid/_row.html.erb @@ -6,7 +6,7 @@ # Adding html clases based on condition # Consider maintaining consistency with datagrid/head partial "datagrid-order-active-asc": grid.ordered_by?(column, false), - "datagrid-order-active-desc": grid.ordered_by?(column ,true), + "datagrid-order-active-desc": grid.ordered_by?(column, true), column.html_class => column.html_class.present?, }, "data-column": column.name From f30a9bba953a9cb24314bf3a5b6811e32016834f Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Fri, 15 Nov 2024 20:46:39 +0100 Subject: [PATCH 3/3] Update version-2/views.diff Co-authored-by: Bohdan Zhuravel --- version-2/views.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version-2/views.diff b/version-2/views.diff index 97aeb0e..69d50c6 100644 --- a/version-2/views.diff +++ b/version-2/views.diff @@ -103,7 +103,7 @@ index f54d21c..f57c729 100644 + # Adding html clases based on condition + # Consider maintaining consistency with datagrid/head partial + "datagrid-order-active-asc": grid.ordered_by?(column, false), -+ "datagrid-order-active-desc": grid.ordered_by?(column ,true), ++ "datagrid-order-active-desc": grid.ordered_by?(column, true), + column.html_class => column.html_class.present?, + }, + "data-column": column.name