i had installed the gem "carmen" successfully and also include it in my gem file, but when i write it's code in my view it gives error, here is my view:
<%= form_for(@contact) do |f| %>
开发者_JAVA百科 <div class="field">
<%= f.label :country %><br />
<%= country_select(:country, "US") %>
</div>
<div>
<button type="submit" class="btn btn-green big"><img src= "images/add.png" /> Save</button>
<button type="reset" class="btn btn-gray big">Cancel</button> </div>
<% end %>
I am just confused ,how can i populate a default country Like :india
You should check out the carmen-rails library. If you want IN to be the default then,
<%= f.country_select :country_code, {priority: %w(IN)} %>
精彩评论