Add a custom country field option to country_select ruby on rails gem -
i'm using country_select gem ruby on rails: https://github.com/stefanpenner/country_select
the following code prints list of countries:
<%= f.country_select :countryto, html_options = {:class => "form-control"} %>
i want add custom option field in select dropdown value "anywhere". know how can achieve this? pretty new ruby on rails apologies if there super easy fix, thank you.
according tests of country_select
supports include_blank
-option of select_tag
. should able use:
<%= f.country_select(:country_to, include_blank: 'anywhere') %>
please consider having @ ruby style guide.
Comments
Post a Comment