File tree Expand file tree Collapse file tree 7 files changed +12
-6
lines changed Expand file tree Collapse file tree 7 files changed +12
-6
lines changed Original file line number Diff line number Diff line change
1
+ # For backward compatibility with Redmine < 6.
2
+ # ApplicationRecord is inherited from ActiveRecord Models instead of ActiveRecord::Base in Redmine >= 6.
3
+ # ref: https://www.redmine.org/issues/38975
4
+ unless defined? ( ApplicationRecord )
5
+ ApplicationRecord = ActiveRecord ::Base
6
+ end
Original file line number Diff line number Diff line change 1
- class FtsQueryExpansion < ActiveRecord :: Base
1
+ class FtsQueryExpansion < ApplicationRecord
2
2
if respond_to? ( :connection_db_config )
3
3
adapter = connection_db_config . adapter
4
4
else
Original file line number Diff line number Diff line change 1
1
module FullTextSearch
2
- class IssueContent < ActiveRecord :: Base
2
+ class IssueContent < ApplicationRecord
3
3
end
4
4
end
Original file line number Diff line number Diff line change 1
1
module FullTextSearch
2
- class Tag < ActiveRecord :: Base
2
+ class Tag < ApplicationRecord
3
3
self . table_name = :fts_tags
4
4
belongs_to :type , class_name : "FullTextSearch::TagType"
5
5
Original file line number Diff line number Diff line change 1
1
module FullTextSearch
2
- class TagType < ActiveRecord :: Base
2
+ class TagType < ApplicationRecord
3
3
self . table_name = :fts_tag_types
4
4
has_many :tags , foreign_key : "type_id"
5
5
Original file line number Diff line number Diff line change 1
1
module FullTextSearch
2
- class Target < ActiveRecord :: Base
2
+ class Target < ApplicationRecord
3
3
self . table_name = :fts_targets
4
4
5
5
if respond_to? ( :connection_db_config )
Original file line number Diff line number Diff line change 1
1
module FullTextSearch
2
- class Type < ActiveRecord :: Base
2
+ class Type < ApplicationRecord
3
3
self . table_name = :fts_types
4
4
5
5
class << self
You can’t perform that action at this time.
0 commit comments