2020-02-10 07:08:59 -05:00
|
|
|
# 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-15 14:09:36 -04:00
|
|
|
|
|
|
|
ProjectSetting.prepend_if_ee('EE::ProjectSetting')
|