From 4c35b142e729fa0689cb6ec749a5f4844ba49f59 Mon Sep 17 00:00:00 2001 From: Piotr Furman Date: Sun, 28 Aug 2016 13:51:45 +0200 Subject: [PATCH] Remove unpremmitted keys in params hash Remove Rails 5.0.0.1 deprecation warnings and fixes the ActionDispatch::Routing exception while rendering the grid. --- lib/wice/grid_renderer.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/wice/grid_renderer.rb b/lib/wice/grid_renderer.rb index e431248c..13c520f3 100755 --- a/lib/wice/grid_renderer.rb +++ b/lib/wice/grid_renderer.rb @@ -536,7 +536,7 @@ def no_filter_needed_in_main_table? #:nodoc: end def base_link_for_filter(controller, extra_parameters = {}) #:nodoc: - new_params = Wice::WgHash.deep_clone controller.params + new_params = Wice::WgHash.deep_clone controller.params.to_h new_params.merge!(extra_parameters) if new_params[@grid.name] @@ -556,7 +556,7 @@ def base_link_for_filter(controller, extra_parameters = {}) #:nodoc: end def link_for_export(controller, format, extra_parameters = {}) #:nodoc: - new_params = Wice::WgHash.deep_clone controller.params + new_params = Wice::WgHash.deep_clone controller.params.to_h new_params.merge!(extra_parameters) new_params[@grid.name] = {} unless new_params[@grid.name] @@ -578,7 +578,7 @@ def column_link(column, direction, params, extra_parameters = {}) #:nodoc: ORDER_DIRECTION_PARAMETER_NAME => direction } } - cleaned_params = Wice::WgHash.deep_clone params + cleaned_params = Wice::WgHash.deep_clone params.to_h cleaned_params.merge!(extra_parameters) cleaned_params.delete(:controller)