nbh
nbh

Reputation: 11

How to sort alphabetically for country_select method in carmen-rails 1.0.0.beta 3

I am using carmen-rails 1.0.0.beta 3 and for this I have used the following code:

<%= form_for(contact, remote: true, html: {class: 'popup-form'}) do |f| %>
    <%= f.label :country, t('country') %>
    <%= f.country_select :country, include_blank: "Select" %>
<% end %>

This gives a result like this: Aland Island, Antartica, Afghanisthan, ..........

But I want Afghanisthan to start the list in case of alphabetical order. Can anyone give a solution to this sorting problem. It would be helpful. Thanks.

Upvotes: 0

Views: 528

Answers (1)

surjay
surjay

Reputation: 123

They've fixed this sorting bug, but perhaps they've not repackaged the gem or something. Try specifying the Git URL in your gemfile and I think it will work for you.

gem 'carmen-rails', git: 'https://github.com/jim/carmen-rails.git'

Upvotes: 1

Related Questions