From 1886b10c20aa265902d9242069ce24d3e51e580e Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Mon, 8 Apr 2024 23:45:52 -0300 Subject: [PATCH] Restore config so it doesn't mess with other specs --- spec/ransack/helpers/form_helper_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/ransack/helpers/form_helper_spec.rb b/spec/ransack/helpers/form_helper_spec.rb index db88b838..43aee9e9 100644 --- a/spec/ransack/helpers/form_helper_spec.rb +++ b/spec/ransack/helpers/form_helper_spec.rb @@ -850,6 +850,11 @@ module Helpers before do Ransack.configure { |c| c.search_key = :example } end + + after do + Ransack.configure { |c| c.search_key = nil } + end + subject { @controller.view_context .search_form_for(Person.ransack) { |f| f.text_field :name_eq }