Sha256: 276dee72a0732cf5f97f9c0733eb9f74146002cb495379dcf9a654a148c5764c
Contents?: true
Size: 1.13 KB
Versions: 2
Compression:
Stored size: 1.13 KB
Contents
<%= form_for(@user) do |f| %> <% if @user.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2> <ul> <% @user.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :name %><br> <%= f.text_field :name %> </div> <div class="field"> <%= f.label :email %><br> <%= f.text_field :email %> </div> <div class="field"> <%= f.label :country_id %><br> <%= f.select :country_name, CountryStateSelect::Constant::COUNTRIES, {}, id: 'country_id' %> <!---I have not taken the country_id in below select due to not repeat the two same id--> <%= f.select(:country_id, options_for_select(Array[*CountryStateSelect::Constant::COUNTRIES.collect {|v,i| [v,CountryStateSelect::Constant::COUNTRIES.index(v)] }], :selected => f.object)) %> </div> <div class="field"> <%= f.label :state_name %><br> <%= f.text_field :state_name ,:id=> 'state_name'%> </div> <div class="actions"> <%= f.submit %> </div> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
country_state_select-0.0.4 | test/dummy/app/views/users/_form.html.erb |
country_state_select-0.0.3 | test/dummy/app/views/users/_form.html.erb |