Commit 64a2de22 authored by Michael Kozono's avatar Michael Kozono

Merge branch 'pl-rendering-action-dot-icon' into 'master'

Pass formats explicitly when rendering svg icons

See merge request gitlab-org/gitlab!73291
parents 653e4239 1fc0601d
...@@ -9,9 +9,7 @@ module IconsHelper ...@@ -9,9 +9,7 @@ module IconsHelper
def custom_icon(icon_name, size: DEFAULT_ICON_SIZE) def custom_icon(icon_name, size: DEFAULT_ICON_SIZE)
memoized_icon("#{icon_name}_#{size}") do memoized_icon("#{icon_name}_#{size}") do
# We can't simply do the below, because there are some .erb SVGs. render partial: "shared/icons/#{icon_name}", formats: :svg, locals: { size: size }
# File.read(Rails.root.join("app/views/shared/icons/_#{icon_name}.svg")).html_safe
render "shared/icons/#{icon_name}.svg", size: size
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment