Sha256: 46459af9b41ceb862857329b64154cacdba85847eeff3daac2a773e00f536e13

Contents?: true

Size: 946 Bytes

Versions: 4

Compression:

Stored size: 946 Bytes

Contents

<h1>Demo, using tag helpers</h1>

<% @addresses.each do |address| %>
  <%= form_tag(update_address_path(address), method: :patch) do %>
    <div class="field">
      <%= label_tag(:title) %><br />
      <%= text_field_tag("address[title]", address.title) %>
    </div>

    <div class="field">
      <%= label_tag("address[country]", "Country") %><br />
      <%=
        country_select(
          :address,
          :country,
          selected: address.country,
          include_blank: true
        )
      %>
    </div>

    <div class="field">
      <%= label_tag("address[subdivision]", "State / Province") %><br />
      <%=
        subdivision_select_tag(
          :address,
          :subdivision,
          country: address.country,
          selected: address.subdivision,
          include_blank: true
        )
      %>
    </div>

    <div class="field">
      <%= submit_tag("Update Address") %>
    </div>
  <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
subdivision_select-0.0.6 spec/dummy/app/views/addresses_demo/tags.html.erb
subdivision_select-0.0.5 spec/dummy/app/views/addresses_demo/tags.html.erb
subdivision_select-0.0.4 spec/test_app/app/views/addresses_demo/tags.html.erb
subdivision_select-0.0.3 spec/test_app/app/views/addresses_demo/tags.html.erb