lib/hmote/render.rb in hmote-1.1.0 vs lib/hmote/render.rb in hmote-1.2.0
- old
+ new
@@ -8,9 +8,10 @@
app.settings[:hmote][:views] ||= File.expand_path("views", Dir.pwd)
app.settings[:hmote][:layout] ||= "layout"
end
def render(template, params = {}, layout = settings[:hmote][:layout])
+ res.headers["Content-Type"] ||= "text/html; charset=utf-8"
res.write(view(template, params, layout))
end
def view(template, params = {}, layout = settings[:hmote][:layout])
return partial(layout, params.merge(content: partial(template, params)))