From 1aa0e40cb313a0feb730801cdb8e0600de0a6e28 Mon Sep 17 00:00:00 2001 From: kumojima Date: Fri, 15 Nov 2024 14:08:35 +0900 Subject: [PATCH] use ApplicationRecord --- app/models/trashed_custom_value.rb | 2 +- app/models/trashed_issue.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/trashed_custom_value.rb b/app/models/trashed_custom_value.rb index 712fcb7..fc87484 100644 --- a/app/models/trashed_custom_value.rb +++ b/app/models/trashed_custom_value.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class TrashedCustomValue < ActiveRecord::Base +class TrashedCustomValue < defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base belongs_to :trashed_issue acts_as_attachable view_permission: :view_files diff --git a/app/models/trashed_issue.rb b/app/models/trashed_issue.rb index 2db9665..3e20000 100644 --- a/app/models/trashed_issue.rb +++ b/app/models/trashed_issue.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class TrashedIssue < ActiveRecord::Base +class TrashedIssue < defined?(ApplicationRecord) == 'constant' ? ApplicationRecord : ActiveRecord::Base belongs_to :project has_many :trashed_custom_values, dependent: :destroy belongs_to :deleted_by, class_name: 'User'