summaryrefslogtreecommitdiff
path: root/app/models/bed.rb
diff options
context:
space:
mode:
authorMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
committerMarius Peter <marius.peter@tutanota.com>2025-08-24 20:29:54 +0200
commit52b044d6a4278c229992404ad5801769c2d13363 (patch)
treeb30b34da58f26117c035391d09366b190350b1e3 /app/models/bed.rb
First commit.
Vive le Castel Peter !
Diffstat (limited to 'app/models/bed.rb')
-rw-r--r--app/models/bed.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/bed.rb b/app/models/bed.rb
new file mode 100644
index 0000000..33eafd2
--- /dev/null
+++ b/app/models/bed.rb
@@ -0,0 +1,4 @@
+class Bed < ApplicationRecord
+ has_many :rafts, -> { order(:location) }, dependent: :destroy
+ validates :location, presence: true, uniqueness: true
+end
Copyright 2019--2025 Marius PETER