Skip to content

Commit

Permalink
Merge remote-tracking branch 'josh/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesds committed Jan 6, 2012
2 parents e9fe529 + 29ff9ec commit 1cc764c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/country-select.rb
Expand Up @@ -20,6 +20,10 @@ def country_options_for_select(selected = nil, priority_countries = nil)
end
country_options += options_for_select(priority_countries, selected)
country_options += "<option value=\"\" disabled=\"disabled\">-------------</option>\n"
# prevents selected from being included twice in the HTML which causes
# some browsers to select the second selected option (not priority)
# which makes it harder to select an alternative priority country
selected=nil if priority_countries.include?(selected)
end

return country_options + options_for_select(COUNTRIES, selected)
Expand Down

0 comments on commit 1cc764c

Please sign in to comment.