]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/svg_helper.rb
Merge remote-tracking branch 'upstream/pull/4430'
[rails.git] / app / helpers / svg_helper.rb
index f2e02f7422cc37126900918174c60d51aae5eb93..abb512f0d3c60cba5eae288cf03d1b4a77fce1bc 100644 (file)
@@ -1,8 +1,7 @@
 module SvgHelper
-  def solid_svg_image_tag(width, height, fill, **options)
-    svg = "<svg xmlns='http://www.w3.org/2000/svg' width='#{width}' height='#{height}'>" \
-          "<rect width='100%' height='100%' fill='#{fill}' />" \
-          "</svg>"
-    image_tag "data:image/svg+xml,#{u(svg)}", **options
+  def solid_svg_tag(width, height, fill, **options)
+    tag.svg :width => width, :height => height, **options do
+      tag.rect :width => "100%", :height => "100%", :fill => fill
+    end
   end
 end