lib/cuba/render.rb in cuba-4.0.1 vs lib/cuba/render.rb in cuba-4.0.3
- old
+ new
@@ -11,10 +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.headers[Rack::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)))