Select element, simple_form helper
ruby-on-rails, simple-form
Solution
<%= f.input :customer_currency, :collection => [['UGX- Uganda Shillings',1],['USD- US Dollars',2]] %>
Problem
I am trying to create an element in my form that uses simple form+bootstrap. The idea is to allow a user select a type of currency from a drop down. Customer_currency to select from either USD- US Dollars, LRD - Liberian dollar among others. I have used the following in my form However, it is not working, all I see is a drop down (out of position) in my form with the options but no label. How can i create a good select element with a label using simple form ``` <%= simple_form_for @customer, :html => { :class => 'form-horizontal' } do |f| %> <%= f.input :name %> <%= f.select :customer_currency, [['UGX- Uganda Shillings',1],['USD- US Dollars',2]] %> <%= f.input :payment_terms %> <%= f.input :billing_address %> <%= f.input :first_name %> <%= f.input :last_name %> <%= f.input :mobile %> <%= f.input :email %> <div class="form-actions"> <%= f.button :submit, :class => 'btn-primary' %> <%= link_to t('.cancel', :default => t("helpers.links.cancel")), customers_path, :class => 'btn' %> </div> <% end %> ```