]> git.openstreetmap.org Git - rails.git/blobdiff - lib/locale.rb
Use factories to generate the relations
[rails.git] / lib / locale.rb
index bb09ae327121361f7c782bcb778e28220b70e91d..e10f066329a0fd4e126d1416c55271f86fbc564b 100644 (file)
@@ -3,7 +3,7 @@ class Locale < I18n::Locale::Tag::Rfc4646
     attr_reader :locales
 
     def initialize(tags)
-      super(tags.map { |tag| Locale.tag(tag) })
+      super(tags.map { |tag| Locale.tag(tag) }).compact!
     end
 
     def candidates(preferred)