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.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/raft.rb b/app/models/raft.rb
new file mode 100644
index 0000000..af52700
--- /dev/null
+++ b/app/models/raft.rb
@@ -0,0 +1,5 @@
+class Raft < ApplicationRecord
+ belongs_to :bed
+ belongs_to :crop
+ validates :location, presence: true, uniqueness: { scope: :bed_id }
+end
Copyright 2019--2025 Marius PETER