summaryrefslogtreecommitdiff
path: root/app/models/raft.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/raft.rb')
-rw-r--r--app/models/raft.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/raft.rb b/app/models/raft.rb
index af52700..3fe5928 100644
--- a/app/models/raft.rb
+++ b/app/models/raft.rb
@@ -1,5 +1,5 @@
class Raft < ApplicationRecord
belongs_to :bed
- belongs_to :crop
+ belongs_to :crop, optional: true
validates :location, presence: true, uniqueness: { scope: :bed_id }
end
Copyright 2019--2025 Marius PETER