aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-01-13 04:09:18 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-01-13 04:09:18 +0000
commit47f99584b3ad6ef15b42f439251ec8dab4d75dfa (patch)
tree6607093753c4f27fe93668e745096a5378a105d1 /railties
parente24d2f72344baecbcd6fbb76fe3a3171762182e0 (diff)
downloadrails-47f99584b3ad6ef15b42f439251ec8dab4d75dfa.tar.gz
rails-47f99584b3ad6ef15b42f439251ec8dab4d75dfa.tar.bz2
rails-47f99584b3ad6ef15b42f439251ec8dab4d75dfa.zip
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
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/rails_generator/commands.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 956814f17f..8bf673b027 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Generator: use destination path for diff tempfiles. #7015 [alfeld]
+
* Fixed that webrick would strip leading newlines and hang connection #4156 [psross]
* Ensure plugins are in the Dependencies.load_once_paths collection by default. [Rick]
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}`