Contracts <%= link_to 'Add Contract', new_contract_path, :class => "btn btn-success" if can? :create, Contract %>

<% @contracts.sort_by{|r| (r.last_name) || "" }.each do |contract| %> <% end %>
Scan? Name User Date
<% unless contract.document.blank? %> <% end %> <%= contract.last_name %>, <%= contract.first_name %> <%= "and #{contract.cosigner}" unless contract.cosigner.blank? %> <%= link_to contract.user.name, contract.user if contract.user %> <%= contract.signed_at.to_date.to_s(:long) %> <%= link_to "View", contract, class: "btn btn-primary" %> <%= link_to "Edit", edit_contract_path(contract), class: "btn btn-default" %>