Require CustomTab.belongs_to by default

This commit is contained in:
Maikel Linke
2023-07-28 16:19:42 +10:00
parent 070d1e722e
commit 252f809463

View File

@@ -1,7 +1,9 @@
# frozen_string_literal: false
class CustomTab < ApplicationRecord
belongs_to :enterprise, optional: false
self.belongs_to_required_by_default = true
belongs_to :enterprise
validates :title, presence: true, length: { maximum: 20 }
end