From 47f99584b3ad6ef15b42f439251ec8dab4d75dfa Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 13 Jan 2007 04:09:18 +0000 Subject: Generator: use destination path for diff tempfiles. Closes #7015. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/rails_generator/commands.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails_generator') diff --git a/railties/lib/rails_generator/commands.rb b/railties/lib/rails_generator/commands.rb index 783d9aeb3a..d9c471a915 100644 --- a/railties/lib/rails_generator/commands.rb +++ b/railties/lib/rails_generator/commands.rb @@ -96,7 +96,7 @@ module Rails $stdout.print "overwrite #{destination}? [Ynaqd] " case $stdin.gets when /d/i - Tempfile.open(File.basename(destination), File.dirname(destination)) do |temp| + Tempfile.open(File.basename(destination), File.dirname(dst)) do |temp| temp.write render_file(src, file_options, &block) temp.rewind $stdout.puts `#{diff_cmd} #{dst} #{temp.path}` -- cgit v1.2.3