Skip to content

Commit

Permalink
use AdditionalsApplicationRecord for redmine 5.x and 6 support as tem…
Browse files Browse the repository at this point in the history
…p solution
  • Loading branch information
alexandermeindl committed Jun 12, 2024
1 parent 95801be commit 23f60c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/migrate_tag.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class MigrateTag < Rails.version < '7.1' ? ActiveRecord::Base : ApplicationRecord
class MigrateTag < AdditionalsApplicationRecord
self.table_name = 'tags'
has_many :migrate_taggings, dependent: :destroy, foreign_key: :tag_id, inverse_of: :migrate_tag
end
2 changes: 1 addition & 1 deletion app/models/migrate_tagging.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class MigrateTagging < Rails.version < '7.1' ? ActiveRecord::Base : ApplicationRecord
class MigrateTagging < AdditionalsApplicationRecord
self.table_name = 'taggings'
belongs_to :migrate_tag, foreign_key: :tag_id, inverse_of: :migrate_taggings
belongs_to :taggable, polymorphic: true
Expand Down

0 comments on commit 23f60c6

Please sign in to comment.