Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 262 Bytes
require 'haml'
module Haml
module Helpers
def render_file(filename, from_root=false)
dir = from_root ? Dir.pwd : caller[0].match(/^[\w\/]*\//).to_s
contents = File.read(dir + filename)
Haml::Engine.new(contents).render
end
end
end
Something went wrong with that request. Please try again.