diff options
Diffstat (limited to 'app/models/bed.rb')
-rw-r--r-- | app/models/bed.rb | 1 |
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 |