diff options
-rw-r--r-- | .rubocop_todo.yml | 1 | ||||
-rw-r--r-- | lib/redmine/utils.rb | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9078a7fda..638446419 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1097,7 +1097,6 @@ Style/MultilineTernaryOperator: - 'lib/redmine/ciphering.rb' - 'lib/redmine/scm/adapters/filesystem_adapter.rb' - 'lib/redmine/scm/adapters/git_adapter.rb' - - 'lib/redmine/utils.rb' Style/MultipleComparison: Exclude: diff --git a/lib/redmine/utils.rb b/lib/redmine/utils.rb index a876070a8..d9a3819e6 100644 --- a/lib/redmine/utils.rb +++ b/lib/redmine/utils.rb @@ -24,9 +24,11 @@ module Redmine class << self # Returns the relative root url of the application def relative_url_root - ActionController::Base.respond_to?('relative_url_root') ? - ActionController::Base.relative_url_root.to_s : + if ActionController::Base.respond_to?('relative_url_root') + ActionController::Base.relative_url_root.to_s + else ActionController::Base.config.relative_url_root.to_s + end end # Sets the relative root url of the application |