From c08607f4cf28c1814638fedf0c07ea1e6014b028 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 20 Nov 2024 17:33:01 +0100 Subject: [PATCH] Keep compatibility with Redmine 5 --- .github/workflows/master.yml | 1 + init.rb | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 6a30274..2abf8b7 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -88,6 +88,7 @@ jobs: - name: Prepare Redmine source working-directory: redmine run: | + rm -f test/integration/routing/plugins_test.rb # Fix routing tests # TODO Remove this line when https://www.redmine.org/issues/38707 is fixed sed -i '/rubocop/d' Gemfile rm -f .rubocop* cp plugins/redmine_base_rspec/spec/support/database-${{ matrix.db }}.yml config/database.yml diff --git a/init.rb b/init.rb index 05f36c5..f14accf 100644 --- a/init.rb +++ b/init.rb @@ -33,3 +33,9 @@ :if => Proc.new {User.current.logged?}, :last => true end +# Support for Redmine 5 +if Redmine::VERSION::MAJOR < 6 + class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true + end +end