Skip to content

Commit

Permalink
Fix Rails 5 deprecation of calling to_h on ActionController::Parameters
Browse files Browse the repository at this point in the history
Simply calling to_unsafe_h should not be a problem, since we are not assigning
any model attributes and thus do not have to worry about mass assignment
vulnerabilities here.
  • Loading branch information
kreintjes authored and leikind committed Jan 17, 2017
1 parent 2fcb600 commit 5d31d46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/wice_grid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,11 @@ def params #:nodoc:
end

def this_grid_params #:nodoc:
params[name]
if params.respond_to?(:to_unsafe_h)
params[name].to_unsafe_h
else
params[name]
end
end

def resultset_without_paging_without_user_filters #:nodoc:
Expand Down

0 comments on commit 5d31d46

Please sign in to comment.