Working around temporary lack of last names in users
This commit is contained in:
parent
cac59e9de5
commit
e8ef430733
|
@ -2,7 +2,7 @@ class Contract < ActiveRecord::Base
|
||||||
belongs_to :user
|
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
|
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>"},
|
has_attached_file :document, { :styles => { :medium => "300x300>"},
|
||||||
:storage => :s3,
|
:storage => :s3,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% @contracts.sort_by{|r| [r.last_name] }.each do |contract| %>
|
<% @contracts.sort_by{|r| (r.last_name) || "" }.each do |contract| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<%= contract.last_name %>,
|
<%= contract.last_name %>,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user