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

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

17 lines
376 B
Ruby
Raw Permalink Normal View History

2019-07-31 22:56:46 +05:30
# frozen_string_literal: true
class ProjectMetricsSetting < ApplicationRecord
belongs_to :project
validates :external_dashboard_url,
2020-06-23 00:09:42 +05:30
allow_nil: true,
2019-07-31 22:56:46 +05:30
length: { maximum: 255 },
addressable_url: { enforce_sanitization: true, ascii_only: true }
2020-06-23 00:09:42 +05:30
enum dashboard_timezone: { local: 0, utc: 1 }
def dashboard_timezone=(val)
super(val&.downcase)
end
2019-07-31 22:56:46 +05:30
end