From d024c5b75413d22f8fd146d3458646b944b43a84 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Thu, 15 Aug 2024 11:25:17 -0500 Subject: [PATCH] Rails 5.1 - Replace `sanitize` (no longer public method) (#359) * remove version constraints and update next? dual boot to run rails 5.1 * remove version constraint for dev dependency spring * replace sanitize with .connection.quote --- app/models/concerns/hstore_update.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/hstore_update.rb b/app/models/concerns/hstore_update.rb index 02345378..e131d6bb 100644 --- a/app/models/concerns/hstore_update.rb +++ b/app/models/concerns/hstore_update.rb @@ -18,7 +18,7 @@ def hstore_update(column, updater) end def hstore_sanitize(string) - self.class.sanitize string.to_s.gsub /["'=>\(\)]/, '' + self.class.connection.quote string.to_s.gsub /["'=>\(\)]/, '' end def hstore_escape(key_pairs)