From 5147ee28b8685b90ada4a7dff4deb48ee34953f0 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 18 Nov 2024 14:48:58 +0100 Subject: [PATCH] Keep compatibility with Redmine 5 --- lib/redmine_admin_activity/models/custom_field_patch.rb | 2 +- lib/redmine_admin_activity/models/member_patch.rb | 2 +- lib/redmine_admin_activity/models/project_patch.rb | 2 +- lib/redmine_admin_activity/models/version_patch.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/redmine_admin_activity/models/custom_field_patch.rb b/lib/redmine_admin_activity/models/custom_field_patch.rb index 357d732..e732649 100644 --- a/lib/redmine_admin_activity/models/custom_field_patch.rb +++ b/lib/redmine_admin_activity/models/custom_field_patch.rb @@ -12,7 +12,7 @@ def to_s end end -class CustomField < ApplicationRecord +class CustomField prepend RedmineAdminActivity::Models::CustomFieldPatch def self.representative_columns diff --git a/lib/redmine_admin_activity/models/member_patch.rb b/lib/redmine_admin_activity/models/member_patch.rb index f3b7005..8951b50 100644 --- a/lib/redmine_admin_activity/models/member_patch.rb +++ b/lib/redmine_admin_activity/models/member_patch.rb @@ -19,7 +19,7 @@ def update_project_journal end end -class Member < ApplicationRecord +class Member prepend RedmineAdminActivity::Models::MemberPatch attr_reader :project_journal diff --git a/lib/redmine_admin_activity/models/project_patch.rb b/lib/redmine_admin_activity/models/project_patch.rb index 46d0d7d..03f869d 100644 --- a/lib/redmine_admin_activity/models/project_patch.rb +++ b/lib/redmine_admin_activity/models/project_patch.rb @@ -37,7 +37,7 @@ def create_journal end end -class Project < ApplicationRecord +class Project prepend RedmineAdminActivity::Models::ProjectPatch acts_as_watchable diff --git a/lib/redmine_admin_activity/models/version_patch.rb b/lib/redmine_admin_activity/models/version_patch.rb index 4dfd181..4e3cd56 100644 --- a/lib/redmine_admin_activity/models/version_patch.rb +++ b/lib/redmine_admin_activity/models/version_patch.rb @@ -22,7 +22,7 @@ def save_previous_version end end -class Version < ApplicationRecord +class Version prepend RedmineAdminActivity::Models::VersionPatch before_update :save_previous_version