OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Make ActiveRecord models inherit from ApplicationRecord
Christophe Bliardf87a7c4f5c70
diff --git a/app/models/projects/status.rb b/app/models/projects/status.rbindex 7ee66ca97be..d0af5fc25a3 100644--- a/app/models/projects/status.rb+++ b/app/models/projects/status.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class Projects::Status < ActiveRecord::Base+class Projects::Status < ApplicationRecordbelongs_to :projectself.table_name = 'project_statuses'diff --git a/lib/open_project/text_formatting/formats/markdown/textile_converter.rb b/lib/open_project/text_formatting/formats/markdown/textile_converter.rbindex 11ac020eb64..ba9e6d959c6 100644--- a/lib/open_project/text_formatting/formats/markdown/textile_converter.rb+++ b/lib/open_project/text_formatting/formats/markdown/textile_converter.rb@@ -510,7 +510,7 @@ module OpenProject::TextFormatting::Formatsendend- class OldForum < ::ActiveRecord::Base+ class OldForum < ApplicationRecordself.table_name = 'boards'endenddiff --git a/lib/tasks/attachment_migrations.rake b/lib/tasks/attachment_migrations.rakeindex ecc4dce4168..519bccea6a7 100644--- a/lib/tasks/attachment_migrations.rake+++ b/lib/tasks/attachment_migrations.rake@@ -36,6 +36,7 @@ module Migrations# We create a separate classes as this is most likely to be used during# the migration of an ChiliProject (2.x or 3.x) which lacks a couple# of columns models have in OpenProject >6.+ # rubocop:disable Rails/ApplicationRecordmodule Attachmentsclass CurrentWikiPage < ::ActiveRecord::Baseself.table_name = "wiki_pages"@@ -47,6 +48,7 @@ module Migrationsself.table_name = "wiki_contents"endend+ # rubocop:enable Rails/ApplicationRecordendnamespace :migrations dodiff --git a/lib/tasks/delete_documents.rake b/lib/tasks/delete_documents.rakeindex 037eae1943f..a01fa6d80de 100644--- a/lib/tasks/delete_documents.rake+++ b/lib/tasks/delete_documents.rake@@ -32,10 +32,12 @@ namespace :migrations donamespace :documents doinclude Tasks::Shared::UserFeedback+ # rubocop:disable Rails/ApplicationRecordclass TemporaryDocument < ActiveRecord::Basebelongs_to :projectbelongs_to :category, class_name: 'DocumentCategory'end+ # rubocop:enable Rails/ApplicationRecorddesc 'Removes all documents'task delete: :environment do |_task|diff --git a/modules/bim/app/models/bim/bcf/comment.rb b/modules/bim/app/models/bim/bcf/comment.rbindex 86b2ab25a7b..91efda10743 100644--- a/modules/bim/app/models/bim/bcf/comment.rb+++ b/modules/bim/app/models/bim/bcf/comment.rb@@ -27,7 +27,7 @@#++module Bim::Bcf- class Comment < ActiveRecord::Base+ class Comment < ApplicationRecordself.table_name = :bcf_commentsinclude InitializeWithUuiddiff --git a/modules/bim/app/models/bim/bcf/issue.rb b/modules/bim/app/models/bim/bcf/issue.rbindex 31c0f72d46f..7ff39b8889d 100644--- a/modules/bim/app/models/bim/bcf/issue.rb+++ b/modules/bim/app/models/bim/bcf/issue.rb@@ -1,5 +1,5 @@module Bim::Bcf- class Issue < ActiveRecord::Base+ class Issue < ApplicationRecordself.table_name = :bcf_issuesinclude InitializeWithUuiddiff --git a/modules/bim/app/models/bim/bcf/viewpoint.rb b/modules/bim/app/models/bim/bcf/viewpoint.rbindex b652d5ebd02..90d854d045d 100644--- a/modules/bim/app/models/bim/bcf/viewpoint.rb+++ b/modules/bim/app/models/bim/bcf/viewpoint.rb@@ -27,7 +27,7 @@#++module Bim::Bcf- class Viewpoint < ActiveRecord::Base+ class Viewpoint < ApplicationRecordself.table_name = :bcf_viewpointsinclude InitializeWithUuiddiff --git a/modules/bim/app/models/bim/ifc_models/ifc_model.rb b/modules/bim/app/models/bim/ifc_models/ifc_model.rbindex 4352f7e6c52..c72073e8c27 100644--- a/modules/bim/app/models/bim/ifc_models/ifc_model.rb+++ b/modules/bim/app/models/bim/ifc_models/ifc_model.rb@@ -1,6 +1,6 @@module Bimmodule IfcModels- class IfcModel < ActiveRecord::Base+ class IfcModel < ApplicationRecordenum conversion_status: {pending: 0,processing: 1,diff --git a/modules/costs/app/models/time_entry_activities_project.rb b/modules/costs/app/models/time_entry_activities_project.rbindex 3e0ec141dcd..dda89744844 100644--- a/modules/costs/app/models/time_entry_activities_project.rb+++ b/modules/costs/app/models/time_entry_activities_project.rb@@ -26,7 +26,7 @@# See COPYRIGHT and LICENSE files for more details.#++-class TimeEntryActivitiesProject < ActiveRecord::Base+class TimeEntryActivitiesProject < ApplicationRecordbelongs_to :projectbelongs_to :activity, class_name: 'TimeEntryActivity'enddiff --git a/modules/grids/app/models/grids/grid.rb b/modules/grids/app/models/grids/grid.rbindex d2c32083ad1..bb538f37d6b 100644--- a/modules/grids/app/models/grids/grid.rb+++ b/modules/grids/app/models/grids/grid.rb@@ -27,7 +27,7 @@#++module Grids- class Grid < ActiveRecord::Base+ class Grid < ApplicationRecordself.table_name = :gridsserialize :options, Hashdiff --git a/modules/grids/app/models/grids/widget.rb b/modules/grids/app/models/grids/widget.rbindex a51dbb4e5a3..c5cf6d50174 100644--- a/modules/grids/app/models/grids/widget.rb+++ b/modules/grids/app/models/grids/widget.rb@@ -27,7 +27,7 @@#++module Grids- class Widget < ActiveRecord::Base+ class Widget < ApplicationRecordself.table_name = :grid_widgetsbelongs_to :griddiff --git a/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rb b/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rbindex 35f068b936e..350da815b9f 100644--- a/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rb+++ b/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rb@@ -1,4 +1,5 @@class MyProjectPageToGrid < ActiveRecord::Migration[5.2]+ # rubocop:disable Rails/ApplicationRecordclass MyPageEntry < ActiveRecord::Baseself.table_name = 'my_projects_overviews'@@ -8,6 +9,7 @@ class MyProjectPageToGrid < ActiveRecord::Migration[5.2]belongs_to :projectend+ # rubocop:enable Rails/ApplicationRecorddef upreturn unless applicable?