summaryrefslogtreecommitdiff
path: root/app/models/project_setting.rb
blob: 37e4a7be770a3ed7412aeaaa691bef4375240457 (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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