Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vs_code_setting.rb « settings « vs_code « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e55d958d2b4e5b697adabf5a5463d5c4ae9e4218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module VsCode
  module Settings
    class VsCodeSetting < ApplicationRecord
      belongs_to :user, inverse_of: :vscode_settings

      validates :setting_type, presence: true
      validates :content, presence: true

      scope :by_setting_type, ->(setting_type) { where(setting_type: setting_type) }
      scope :by_user, ->(user) { where(user: user) }
    end
  end
end