lib/city_watch/util/renderer.rb in city-watch-0.6.4 vs lib/city_watch/util/renderer.rb in city-watch-0.6.5
- old
+ new
@@ -14,11 +14,11 @@
render_bare(*tpl)
end
end
def render_bare(*tpl)
- Erubis::FastEruby.new(template(*tpl), filename: template_path(*tpl)).result(binding)
+ template(*tpl).result(binding)
end
private
def layout(&block)
@@ -35,11 +35,11 @@
end
def template(*tpl)
return TemplateCache[tpl.join] if TemplateCache[tpl.join]
file_path = template_path(*tpl)
- return template_content(file_path) if CityWatch.debug?
- TemplateCache[tpl.join] ||= template_content(file_path)
+ return Erubis::FastEruby.new(template_content(file_path), filename: file_path) if CityWatch.debug?
+ TemplateCache[tpl.join] ||= Erubis::FastEruby.new(template_content(file_path), filename: file_path)
end
def view_path
ViewPath
end
\ No newline at end of file