Skip to content

Commit

Permalink
Fix broken sort arrow svg in the resource table
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangzinh committed Nov 6, 2016
1 parent 9f323e9 commit 121f43a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/helpers/administrate/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ def display_resource_name(resource_name)
def svg_tag(asset, svg_id, options = {})
svg_attributes = {
"xlink:href".freeze => "#{asset_url(asset)}##{svg_id}",
height: options[:height],
width: options[:width],
}.delete_if { |_key, value| value.nil? }
height: "100%",
width: "100%",
}
xml_attributes = {
"xmlns".freeze => "http://www.w3.org/2000/svg".freeze,
"xmlns:xlink".freeze => "http://www.w3.org/1999/xlink".freeze,
}
height: options[:height],
width: options[:width],
}.delete_if { |_key, value| value.nil? }

content_tag :svg, xml_attributes do
content_tag :use, nil, svg_attributes
Expand Down

0 comments on commit 121f43a

Please sign in to comment.