NerdDiffer/job_tracker

View on GitHub
app/views/companies/show.html.erb

Summary

Maintainability
Test Coverage
<% @page_title = @company.name %>

<h1><%= @company.name %></h1>

<p>
  <%= link_to 'Back', companies_path %> |
  <%= link_to 'Edit', edit_company_path(@company) %>
</p>

<p>
  <strong>Website:</strong>
  <% website = @company.website %>
  <%= link_to(
    website,
    interpolate_link(website),
    target: '_blank'
  ) %>
</p>

<p>
  <h2>Categories</h2>
  <% categories = @company.categories %>
  <% categories.sorted.each do |category| %>
    <li><%= link_to(category.display_name, category_path(category)) %></li>
  <% end %>
</p>

<% locals = { company: @company,
              contacts: @contacts,
              job_applications: @job_applications } %>
<%= render(partial: 'user_attached_records', locals: locals) %>

<%= render 'recruitments' %>