summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-06-14 13:40:46 +0000
committerGo MAEDA <maeda@farend.jp>2022-06-14 13:40:46 +0000
commit637756eef7123a2e677432d8fca23854c0c4fa67 (patch)
tree76cb232fe73cef45bd3338d73cc78af43b1f51c9 /lib
parent0b2308aa28fdc9c74b4a39b3e367a007b90fc8bd (diff)
downloadredmine-637756eef7123a2e677432d8fca23854c0c4fa67.tar.gz
redmine-637756eef7123a2e677432d8fca23854c0c4fa67.zip
Fix RuboCop offense Rails/RootPublicPath (#37248).
git-svn-id: https://svn.redmine.org/redmine/trunk@21633 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/plugin_loader.rb2
-rw-r--r--lib/redmine/wiki_formatting/common_mark/helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/plugin_loader.rb b/lib/redmine/plugin_loader.rb
index ea6c4a8b2..be7f914f4 100644
--- a/lib/redmine/plugin_loader.rb
+++ b/lib/redmine/plugin_loader.rb
@@ -88,7 +88,7 @@ module Redmine
# Absolute path to the plublic directory where plugins assets are copied
cattr_accessor :public_directory
- self.public_directory = Rails.root.join('public/plugin_assets')
+ self.public_directory = Rails.public_path.join('plugin_assets')
def self.create_assets_reloader
plugin_assets_dirs = {}
diff --git a/lib/redmine/wiki_formatting/common_mark/helper.rb b/lib/redmine/wiki_formatting/common_mark/helper.rb
index 5d3141c26..244055dbe 100644
--- a/lib/redmine/wiki_formatting/common_mark/helper.rb
+++ b/lib/redmine/wiki_formatting/common_mark/helper.rb
@@ -26,7 +26,7 @@ module Redmine
help_file = "/help/#{current_language.to_s.downcase}/wiki_syntax_common_mark.html"
# fall back to the english help page if there is none for the current
# language
- unless File.readable? Rails.root.join("public", help_file)
+ unless File.readable? Rails.public_path.join(help_file)
help_file = "/help/en/wiki_syntax_common_mark.html"
end
url = "#{Redmine::Utils.relative_url_root}#{help_file}"