diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-09 00:01:00 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-09 00:01:00 -0700 |
commit | eb8c0a7b1a4ecad676e4d0733bbf91b88fb01e2a (patch) | |
tree | 714871363eaaba2123ceebc12e94b307aea6148c /railties/lib/rails/commands | |
parent | af3f0b6204dd81b4df50dbc567276bf5c8264ebe (diff) | |
parent | 331d58fb04821546b1e622290432a2dd13e52301 (diff) | |
download | rails-eb8c0a7b1a4ecad676e4d0733bbf91b88fb01e2a.tar.gz rails-eb8c0a7b1a4ecad676e4d0733bbf91b88fb01e2a.tar.bz2 rails-eb8c0a7b1a4ecad676e4d0733bbf91b88fb01e2a.zip |
Merge pull request #1356 from flippingbits/fix_engine_generator
Fix engine's generator
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r-- | railties/lib/rails/commands/generate.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/generate.rb b/railties/lib/rails/commands/generate.rb index b6f9a003d1..1fb2d98834 100644 --- a/railties/lib/rails/commands/generate.rb +++ b/railties/lib/rails/commands/generate.rb @@ -7,4 +7,6 @@ if ARGV.first.in?([nil, "-h", "--help"]) end name = ARGV.shift -Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => Rails.root + +root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root +Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => root |