robertpyke/thesis

View on GitHub
webapp/app/views/layers/_form.html.erb

Summary

Maintainability
Test Coverage
<%= form_for([@layer.map, @layer], :html => { :multipart => true }) do |f| %>
  <% if @layer.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@layer.errors.count, "error") %> prohibited this layer from being saved:</h2>

      <ul>
      <% @layer.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 :csv_file %><br />
    <%= f.file_field :csv_file %>
  </div>

  <div class="field">
    <%= f.label :renderable_file %><br />
    <%= f.file_field :renderable_file %>
  </div>

  <div class="actions">
    <%= f.submit %>
  </div>


<% end %>