Skip to content

Commit

Permalink
Remove unpremmitted keys in params hash
Browse files Browse the repository at this point in the history
Remove Rails 5.0.0.1 deprecation warnings and fixes the ActionDispatch::Routing exception while rendering the grid.
  • Loading branch information
harryPL authored Aug 28, 2016
1 parent f3d6c46 commit 4c35b14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/wice/grid_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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)
Expand Down

0 comments on commit 4c35b14

Please sign in to comment.