From 02e349261c9b1d8b19d060055f8666908847851e Mon Sep 17 00:00:00 2001 From: Godwin Date: Wed, 14 Dec 2016 09:38:11 -0800 Subject: [PATCH] Smarter city search caching --- app/models/city_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/city_cache.rb b/app/models/city_cache.rb index c763454..1e72f8d 100644 --- a/app/models/city_cache.rb +++ b/app/models/city_cache.rb @@ -14,7 +14,7 @@ class CityCache < ActiveRecord::Base end private - def normalize_string(str) + def self.normalize_string(str) # remove accents, unnecessary whitespace, punctuation, and lowcase tje string I18n.transliterate(str).gsub(/[^\w\s]/, '').gsub(/\s\s+/, ' ').strip.downcase end