lib/cuba/render.rb in cuba-3.3.0 vs lib/cuba/render.rb in cuba-3.4.0
- old
+ new
@@ -11,9 +11,10 @@
default_encoding: Encoding.default_external
}
end
def render(template, locals = {}, layout = settings[:render][:layout])
+ res.headers["Content-Type"] ||= "text/html; charset=utf-8"
res.write(view(template, locals, layout))
end
def view(template, locals = {}, layout = settings[:render][:layout])
partial(layout, locals.merge(content: partial(template, locals)))