Working around temporary lack of last names in users

This commit is contained in:
Will Bradley 2014-03-02 19:39:04 -07:00
parent cac59e9de5
commit e8ef430733
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ class Contract < ActiveRecord::Base
belongs_to :user
attr_accessible :user_id, :first_name, :last_name, :signed_at, :document, :document_file_name, :document_content_type, :document_file_size, :document_updated_at
validates_presence_of :first_name, :last_name, :signed_at
validates_presence_of :first_name, :signed_at #, :last_name
has_attached_file :document, { :styles => { :medium => "300x300>"},
:storage => :s3,

View File

@ -12,7 +12,7 @@
<th></th>
</tr>
<% @contracts.sort_by{|r| [r.last_name] }.each do |contract| %>
<% @contracts.sort_by{|r| (r.last_name) || "" }.each do |contract| %>
<tr>
<td>
<%= contract.last_name %>,