blob: c66d0f52f4c066aa872f75e115b3a78e22158587 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class ProjectMetricsSetting < ApplicationRecord
belongs_to :project
validates :external_dashboard_url,
allow_nil: true,
length: { maximum: 255 },
addressable_url: { enforce_sanitization: true, ascii_only: true }
enum dashboard_timezone: { local: 0, utc: 1 }
def dashboard_timezone=(val)
super(val&.downcase)
end
end
|