debian-mirror-gitlab/app/models/project_tracing_setting.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
349 B
Ruby
Raw Normal View History

2021-01-03 14:25:43 +05:30
# frozen_string_literal: true
class ProjectTracingSetting < ApplicationRecord
belongs_to :project
validates :external_url, length: { maximum: 255 }, public_url: true
before_validation :sanitize_external_url
private
def sanitize_external_url
self.external_url = Rails::Html::FullSanitizer.new.sanitize(self.external_url)
end
end