lib/clutterbuck/erb.rb in clutterbuck-erb-0.2.0 vs lib/clutterbuck/erb.rb in clutterbuck-erb-0.2.1
- old
+ new
@@ -143,8 +143,10 @@
def view_content(view)
File.read(File.join(self.class.views, view.to_s + ".html.erb"))
end
def erbterpreter(view)
- ERB.new(view_content(view), 0, "%-")
+ file = view_content(view)
+
+ ERB.new(file, 0, "%-").tap { |erb| erb.filename = file }
end
end