lib/cloudstack-nagios/helper.rb in cloudstack-nagios-0.3.1 vs lib/cloudstack-nagios/helper.rb in cloudstack-nagios-0.3.2

- old
+ new

@@ -1,10 +1,11 @@ module CloudstackNagios module Helper def load_template(template_path) if File.file?(template_path) - templ = File.read(template_path) - return Erubis::Eruby.new(templ) + templ = Erubis::Eruby.new(File.read template_path) + templ.filename = template_path + return templ else say "Error: template not found #{template_path}" exit 1 end end