Skip to content

Commit

Permalink
Rails 5 compatibility: url query params
Browse files Browse the repository at this point in the history
As "params" is now an ActionController::Parameters and not an Hash, in
rails 5, the method that set query parameters in url should be fixed, to
take this change in consideration.
  • Loading branch information
nmeylan committed Feb 20, 2016
1 parent 2f0b469 commit e11cae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/will_paginate/view_helpers/link_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def symbolized_update(target, other)
key = key.to_sym
existing = target[key]

if value.is_a?(Hash) and (existing.is_a?(Hash) or existing.nil?)
if (value.is_a?(ActionController::Parameters) or value.is_a?(Hash)) and (existing.is_a?(Hash) or existing.nil?)
symbolized_update(existing || (target[key] = {}), value)
else
target[key] = value
Expand Down

0 comments on commit e11cae7

Please sign in to comment.