diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-01-15 20:15:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-15 20:15:45 +0100 |
commit | f8a3981beb4221c230a2dc366db5fcc5e276f035 (patch) | |
tree | cb22b2e410896c7a212744916f9a541a9ac6f444 /railties/lib/rails/engine/commands.rb | |
parent | 0bc8d0fb88101a7ea5f87df5f5b384746e3cf06e (diff) | |
parent | f5f834fb349c62efdb3db45b8ec392c9f70826f0 (diff) | |
download | rails-f8a3981beb4221c230a2dc366db5fcc5e276f035.tar.gz rails-f8a3981beb4221c230a2dc366db5fcc5e276f035.tar.bz2 rails-f8a3981beb4221c230a2dc366db5fcc5e276f035.zip |
Merge pull request #27601 from y-yagi/make_work_all_commands_from_engine
Make all rails commands work in engine
Diffstat (limited to 'railties/lib/rails/engine/commands.rb')
-rw-r--r-- | railties/lib/rails/engine/commands.rb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/railties/lib/rails/engine/commands.rb b/railties/lib/rails/engine/commands.rb index a23ae44b0b..b9ef63243a 100644 --- a/railties/lib/rails/engine/commands.rb +++ b/railties/lib/rails/engine/commands.rb @@ -1,12 +1,7 @@ -require "rails/command" +unless defined?(APP_PATH) + if File.exist?(File.expand_path("test/dummy/config/application.rb", ENGINE_ROOT)) + APP_PATH = File.expand_path("test/dummy/config/application", ENGINE_ROOT) + end +end -aliases = { - "g" => "generate", - "d" => "destroy", - "t" => "test" -} - -command = ARGV.shift -command = aliases[command] || command - -Rails::Command.invoke command, ARGV +require "rails/commands" |