summaryrefslogtreecommitdiff
path: root/rvh
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-03-15 14:27:59 -0600
committermo khan <mo.khan@gmail.com>2020-03-15 14:27:59 -0600
commit863d9a4928309d36b99ff63a7a214d6e5c3df80c (patch)
treee7e4b432785bf10b22f007b4918be4bc8e1914ca /rvh
parent80dbb9c6707eff038eec90df2420b2147149e47a (diff)
Add available? method
Diffstat (limited to 'rvh')
-rw-r--r--rvh/app/models/bed.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/rvh/app/models/bed.rb b/rvh/app/models/bed.rb
index a6f78ee..592bd8d 100644
--- a/rvh/app/models/bed.rb
+++ b/rvh/app/models/bed.rb
@@ -1,4 +1,8 @@
class Bed < ApplicationRecord
belongs_to :care_centre
belongs_to :patient
+
+ def available?
+ patient.blank?
+ end
end