diff options
author | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-05-26 17:59:00 +0200 |
---|---|---|
committer | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-05-26 17:59:00 +0200 |
commit | 835c9cee3ede273030bae5dcf465176d64b287dd (patch) | |
tree | 208c4290d695e22349a1d299ec1a09c2d2bf52d8 /railties/lib/rails/commands | |
parent | 60281af200180d752b8300bdad3c0a869d56347f (diff) | |
download | rails-835c9cee3ede273030bae5dcf465176d64b287dd.tar.gz rails-835c9cee3ede273030bae5dcf465176d64b287dd.tar.bz2 rails-835c9cee3ede273030bae5dcf465176d64b287dd.zip |
Introducing engine commands
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r-- | railties/lib/rails/commands/generate.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/generate.rb b/railties/lib/rails/commands/generate.rb index b6f9a003d1..1f742f8853 100644 --- a/railties/lib/rails/commands/generate.rb +++ b/railties/lib/rails/commands/generate.rb @@ -7,4 +7,9 @@ if ARGV.first.in?([nil, "-h", "--help"]) end name = ARGV.shift -Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => Rails.root + +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 |