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

Support Rails 6 in #sort_link helper

This commit is contained in:
Andrei Shaidurov 2019-02-08 11:13:49 +10:00
parent 50ef94f9f1
commit 04254287f9

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