Class: Renalware::Problems::Problem
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Sortable
#set_position
#first_or_create_by!, #save_by, #save_by!, #update_by
Class Method Details
.archived ⇒ Object
41
42
43
|
# File 'app/models/renalware/problems/problem.rb', line 41
def self.archived
only_deleted.with_notes
end
|
.current ⇒ Object
37
38
39
|
# File 'app/models/renalware/problems/problem.rb', line 37
def self.current
all.with_notes
end
|
.reject_if_proc ⇒ Object
65
66
67
|
# File 'app/models/renalware/problems/problem.rb', line 65
def self.reject_if_proc
proc { |attrs| attrs[:description].blank? }
end
|
.with_archived ⇒ Object
33
34
35
|
# File 'app/models/renalware/problems/problem.rb', line 33
def self.with_archived
with_deleted
end
|
Instance Method Details
#archived? ⇒ Boolean
45
46
47
|
# File 'app/models/renalware/problems/problem.rb', line 45
def archived?
deleted?
end
|
#archived_at ⇒ Object
49
50
51
|
# File 'app/models/renalware/problems/problem.rb', line 49
def archived_at
deleted_at
end
|
#archived_on ⇒ Object
53
54
55
|
# File 'app/models/renalware/problems/problem.rb', line 53
def archived_on
deleted_at.to_date
end
|
#created_on ⇒ Object
57
58
59
|
# File 'app/models/renalware/problems/problem.rb', line 57
def created_on
created_at.to_date
end
|
73
74
75
|
# File 'app/models/renalware/problems/problem.rb', line 73
def formatted
"#{full_description}, #{date}"
end
|
#full_description ⇒ Object
69
70
71
|
# File 'app/models/renalware/problems/problem.rb', line 69
def full_description
description
end
|
#updated_on ⇒ Object
61
62
63
|
# File 'app/models/renalware/problems/problem.rb', line 61
def updated_on
updated_at.to_date
end
|