diff --git a/lib/ransack/helpers/form_helper.rb b/lib/ransack/helpers/form_helper.rb index 84eb4a0..03a84ca 100644 --- a/lib/ransack/helpers/form_helper.rb +++ b/lib/ransack/helpers/form_helper.rb @@ -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