aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Calavera <david.calavera@gmail.com>2009-08-30 16:25:07 +0200
committerJosé Valim <jose.valim@gmail.com>2009-08-30 16:25:07 +0200
commit0fc5c59b37b4e2a809213c63bc9018bee7dc4aaf (patch)
tree67b40125606ab1ccc72665ed31e0823839a628ee /railties
parent0f9675a8726988e0c5fe66450f03de0389e505ec (diff)
downloadrails-0fc5c59b37b4e2a809213c63bc9018bee7dc4aaf.tar.gz
rails-0fc5c59b37b4e2a809213c63bc9018bee7dc4aaf.tar.bz2
rails-0fc5c59b37b4e2a809213c63bc9018bee7dc4aaf.zip
Rails templates git command runs inside another directory [#2466 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/generators/actions.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/railties/lib/generators/actions.rb b/railties/lib/generators/actions.rb
index 03d0d11a07..c4552dd399 100644
--- a/railties/lib/generators/actions.rb
+++ b/railties/lib/generators/actions.rb
@@ -89,13 +89,11 @@ module Rails
# git :add => "onefile.rb", :rm => "badfile.cxx"
#
def git(command={})
- in_root do
- if command.is_a?(Symbol)
- run "git #{command}"
- else
- command.each do |command, options|
- run "git #{command} #{options}"
- end
+ if command.is_a?(Symbol)
+ run "git #{command}"
+ else
+ command.each do |command, options|
+ run "git #{command} #{options}"
end
end
end