mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Require CustomTab.belongs_to by default
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user