]> source.dussan.org Git - redmine.git/commitdiff
Use @image_url@ for @favicon_url@ (#40087).
authorMarius Balteanu <marius.balteanu@zitec.com>
Tue, 23 Jan 2024 01:23:29 +0000 (01:23 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Tue, 23 Jan 2024 01:23:29 +0000 (01:23 +0000)
Patch by Go Maeda (@maeda).

git-svn-id: https://svn.redmine.org/redmine/trunk@22618 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index a82163b76a89d9acf045822779bb1c6608242020..4d87f60757686af0dc1a55b01e1aeb820c32cddf 100644 (file)
@@ -1759,10 +1759,7 @@ module ApplicationHelper
 
   # Returns the full URL to the favicon
   def favicon_url
-    # TODO: use #image_url introduced in Rails4
-    path = favicon_path
-    base = url_for(:controller => 'welcome', :action => 'index', :only_path => false)
-    base.sub(%r{/+$}, '') + '/' + path.sub(%r{^/+}, '')
+    image_url(favicon_path)
   end
 
   def robot_exclusion_tag