lib/yaks/format/html.rb in yaks-html-0.11.0 vs lib/yaks/format/html.rb in yaks-html-0.12.0
- old
+ new
@@ -19,10 +19,14 @@
template.replace('.resource') do |_|
render(resource)
end.replace('.yaks-version') do |ver|
ver.content(Yaks::VERSION)
end.replace('.request-info') do |req|
- req.content(env['REQUEST_METHOD'], ' ', env['PATH_INFO'])
+ if env['REQUEST_METHOD'] && env['PATH_INFO']
+ req.content(env['REQUEST_METHOD'], ' ', env['PATH_INFO'])
+ else
+ req
+ end
end
end
def render(*args)
object = args.first