Redefine rails application methods to use Rails.application

This commit is contained in:
Dombi Attila
2024-01-09 14:30:11 +02:00
parent 092323e538
commit 17296b3c92
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
require File.expand_path('config/application', __dir__)
OpenProject::Application.load_rake_tasks
Rails.application.load_rake_tasks
Rake::Task[:default].clear
task default: 'test:suite:run'
+1 -1
View File
@@ -53,7 +53,7 @@ module RakeJob
##
# Load tasks if there are none. This should only be run once in an environment
def load_tasks!
OpenProject::Application.load_rake_tasks unless tasks_loaded?
Rails.application.load_rake_tasks unless tasks_loaded?
end
##
+2 -2
View File
@@ -232,13 +232,13 @@ module OpenProject
Settings::Definition.add_all
end
def self.root_url
def root_url
"#{Setting.protocol}://#{Setting.host_name}"
end
##
# Load core and engine tasks we're interested in
def self.load_rake_tasks
def load_rake_tasks
load_tasks
Doorkeeper::Rake.load_tasks
end