summaryrefslogtreecommitdiff
path: root/app/models/bed.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/bed.rb')
-rw-r--r--app/models/bed.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/bed.rb b/app/models/bed.rb
index 33eafd2..d41afe6 100644
--- a/app/models/bed.rb
+++ b/app/models/bed.rb
@@ -1,4 +1,5 @@
class Bed < ApplicationRecord
has_many :rafts, -> { order(:location) }, dependent: :destroy
+ accepts_nested_attributes_for :rafts
validates :location, presence: true, uniqueness: true
end
Copyright 2019--2025 Marius PETER