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

14 lines
314 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
class ProjectSetting < ApplicationRecord
belongs_to :project, inverse_of: :project_setting
self.primary_key = :project_id
def self.where_or_create_by(attrs)
where(primary_key => safe_find_or_create_by(attrs))
end
end
2020-04-22 19:07:51 +05:30
ProjectSetting.prepend_if_ee('EE::ProjectSetting')