1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00

Merge pull request #1001 from sandrew/master

Support Rails 6 in #sort_link helper
This commit is contained in:
Greg Molnar 2019-02-08 08:05:13 +01:00 committed by GitHub
commit f663d64c50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,7 @@ module Ransack
private
def parameters_hash(params)
if ::ActiveRecord::VERSION::MAJOR == 5 && params.respond_to?(:to_unsafe_h)
if ::ActiveRecord::VERSION::MAJOR >= 5 && params.respond_to?(:to_unsafe_h)
params.to_unsafe_h
else
params