Always validate inbox_url presence on relay

This commit is contained in:
Matt Jankowski 2024-10-09 13:04:49 -04:00
parent e15befebbd
commit c0aa75d5a4

View file

@ -13,7 +13,8 @@
# #
class Relay < ApplicationRecord class Relay < ApplicationRecord
validates :inbox_url, presence: true, uniqueness: true, url: true, if: :will_save_change_to_inbox_url? validates :inbox_url, presence: true
validates :inbox_url, uniqueness: true, url: true, if: :will_save_change_to_inbox_url?
enum :state, { idle: 0, pending: 1, accepted: 2, rejected: 3 } enum :state, { idle: 0, pending: 1, accepted: 2, rejected: 3 }