Skip to content

Instantly share code, notes, and snippets.

@dandrews
Forked from tomeara/inline_svg_helper.rb
Created February 4, 2014 00:20
Show Gist options
  • Save dandrews/8795214 to your computer and use it in GitHub Desktop.
Save dandrews/8795214 to your computer and use it in GitHub Desktop.
# Put this method in your helper file to render inline SVG
def inline_svg(path)
file = File.open("app/assets/images/#{path}", "rb")
raw file.read
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment