Skip to content

Commit

Permalink
More bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
awd-switzerland committed Apr 4, 2013
1 parent b961283 commit bbf7f27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/swissmatch/zipcodes.rb
Expand Up @@ -196,9 +196,9 @@ def autocompleted_names(name)
# An array of ZipCode names suitable for presentation of a select. # An array of ZipCode names suitable for presentation of a select.
def names_for_select(language=nil) def names_for_select(language=nil)
if language if language
names = base.flat_map { |zip_code| [zip_code.name, zip_code.suggested_name(I18n.language)] } names = flat_map { |zip_code| [zip_code.name, zip_code.suggested_name(I18n.language)] }
else else
names = base.map(&:name) names = map(&:name)
end end


names.uniq.sort(&Unicode.method(:strcmp)) names.uniq.sort(&Unicode.method(:strcmp))
Expand Down

0 comments on commit bbf7f27

Please sign in to comment.