]> source.dussan.org Git - redmine.git/commitdiff
Fix RuboCop offense Rails/RootPublicPath (#37248).
authorGo MAEDA <maeda@farend.jp>
Tue, 14 Jun 2022 13:40:46 +0000 (13:40 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 14 Jun 2022 13:40:46 +0000 (13:40 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@21633 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/plugin_loader.rb
lib/redmine/wiki_formatting/common_mark/helper.rb

index ea6c4a8b20ef4881082f97b01de2e5e034f5bd2e..be7f914f4f66d0d37092e8a576c423f504700bc0 100644 (file)
@@ -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 = {}
index 5d3141c268c9953bc47c1ffcb4ef1844fcbed504..244055dbe87e5c4c992e1adc5d984bd2e61a00cb 100644 (file)
@@ -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}"