분 추가 (스케쥴 new 추가 필요)

This commit is contained in:
2025-04-18 15:54:19 +09:00
parent cd7620672f
commit eb3bc33509
10 changed files with 127 additions and 48 deletions

View File

@@ -1,6 +1,9 @@
class Schedule < ApplicationRecord
validates :hour, presence: true
validates :minute, presence: true
validates :temperature,
presence: true,
numericality: true,
format: { with: /\A\d+(\.\d)?\z/ }
validates :minute, uniqueness: { scope: :hour }
end