From 04254287f978cf4d78e975d36a25389b5cb581e9 Mon Sep 17 00:00:00 2001 From: Andrei Shaidurov Date: Fri, 8 Feb 2019 11:13:49 +1000 Subject: [PATCH] Support Rails 6 in #sort_link helper --- lib/ransack/helpers/form_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ransack/helpers/form_helper.rb b/lib/ransack/helpers/form_helper.rb index 84eb4a013..03a84ca53 100644 --- a/lib/ransack/helpers/form_helper.rb +++ b/lib/ransack/helpers/form_helper.rb @@ -145,7 +145,7 @@ def html_options(args) 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