mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
13 lines
259 B
Ruby
13 lines
259 B
Ruby
# frozen_string_literal: false
|
|
|
|
class CustomTab < ApplicationRecord
|
|
belongs_to :enterprise
|
|
|
|
validates :title, presence: true, length: { maximum: 20 }
|
|
|
|
# Remove any unsupported HTML.
|
|
def content=(html)
|
|
super(HtmlSanitizer.sanitize(html))
|
|
end
|
|
end
|