diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/generate.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/railties/lib/rails/commands/generate.rb b/railties/lib/rails/commands/generate.rb index 1f742f8853..1fb2d98834 100644 --- a/railties/lib/rails/commands/generate.rb +++ b/railties/lib/rails/commands/generate.rb @@ -8,8 +8,5 @@ end name = ARGV.shift -if defined?(ENGINE_ROOT) - Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => ENGINE_ROOT -else - Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => Rails.root -end +root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root +Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => root |