camdub/Internships

View on GitHub
app/views/departments/_form.html.erb

Summary

Maintainability
Test Coverage
<%= form_for(@department) do |f| %>
  <% if @department.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@department.errors.count, "error") %> prohibited this department from being saved:</h2>

      <ul>
      <% @department.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

    <div class="actions grid_16">
        <% content_tag :button, :type => :submit, :class => "green round_all" do %>
                 <%= image_tag "icons/small/white/Bended%20Arrow%20Right.png" %>
                <span>Save this Department!</span>
            <% end %>
    </div>

<div class="box grid_16">
    <div class="block">

  <div class="field">
    <%= f.label :name %>
    <%= f.text_field :name %>
  </div>
    <div class="field">
        <%= f.label :college_id %>
        <%= f.collection_select :college_id, College.all, :id, :name, {}, {:class => 'chosen'} %>
    </div>

</div></div>

<% end %>