Skip to content

Commit

Permalink
Refactor identifying generator's destination root
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Sprenger committed May 27, 2011
1 parent a0ee227 commit 5f00592
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions railties/lib/rails/commands/generate.rb
Expand Up @@ -8,8 +8,5 @@


name = ARGV.shift name = ARGV.shift


if defined?(ENGINE_ROOT) root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root
Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => ENGINE_ROOT Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => root
else
Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => Rails.root
end

0 comments on commit 5f00592

Please sign in to comment.