I am using the country_select gem in Rails 4 in a form tag:
<%= form_tag(@url, method: :post, class: "form-horizontal") do %>
<div class="form-group">
<%= label_tag(:country_code, "Country code") %>
<%= country_select :country_code, @country_code, class: "form-control" %>
</div><% end %>
I am getting the following error.
undefined method `NZ' for "NZ":String
This is a quiet unusual error and I have not found any other instances of it for the country_select gem. The rails application does not have a database and is communicating to an external database so there are no models in this application. I have been suggested to use Open Struct to get around this issue. However, I am wondering does anyone know of a quicker fix? The form is picking up the data in the database though!