lib/rails_erd/diagram/graphviz.rb in rails-erd-1.3.1 vs lib/rails_erd/diagram/graphviz.rb in rails-erd-1.4.0

- old
+ new

@@ -192,12 +192,13 @@ extend self.class.const_get(options.notation.to_s.capitalize.to_sym) end save do raise "Saving diagram failed!\nOutput directory '#{File.dirname(filename)}' does not exist." unless File.directory?(File.dirname(filename)) + begin # GraphViz doesn't like spaces in the filename - graph.output(filetype => filename.gsub(/\s/,"\\ ")) + graph.output(filetype => filename.gsub(/\s/,"_")) filename rescue RuntimeError => e raise "Saving diagram failed!\nGraphviz produced errors. Verify it " + "has support for filetype=#{options.filetype}, or use " + "filetype=dot.\nOriginal error: #{e.message.split("\n").last}"