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