Sha256: 80b5d5e2195e4436d658a5e8d172a2ce1a4685ecebd0bf946ce565e23dd20d81

Contents?: true

Size: 430 Bytes

Versions: 6

Compression:

Stored size: 430 Bytes

Contents

<% regions = CountriesRegionsAndCitiesByPete::get_regions(selected_country) 
form_object = model.underscore
%>
<% selected ||= selected %>

<div id="region_code_wrapper">
  <% if regions %>
    <label><%=label%></label><br />
	<%
	#	byebug
	%>
    <%= select_tag "#{form_object}[region]", options_for_select(regions.sort_by{|c| c.name}.map{|c| [c.name, c.code]}, selected), include_blank: true, id: "region" %>
  <% end %>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
countries_regions_and_cities_by_pete-0.3.5 templates/_region_select_by_pete.html.erb
countries_regions_and_cities_by_pete-0.3.4 templates/_region_select_by_pete.html.erb
countries_regions_and_cities_by_pete-0.3.3 templates/_region_select_by_pete.html.erb
countries_regions_and_cities_by_pete-0.3.2 templates/_region_select_by_pete.html.erb
countries_regions_and_cities_by_pete-0.3.0 templates/_region_select_by_pete.html.erb
countries_regions_and_cities_by_pete-0.2.0 templates/_region_select_by_pete.html.erb