aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/command.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb
index 73f9684ca4..d8549db62e 100644
--- a/railties/lib/rails/command.rb
+++ b/railties/lib/rails/command.rb
@@ -39,7 +39,8 @@ module Rails
command_name = "help" if command_name.blank? || HELP_MAPPINGS.include?(command_name)
namespace = "version" if %w( -v --version ).include?(command_name)
- if command = find_by_namespace(namespace, command_name)
+ command = find_by_namespace(namespace, command_name)
+ if command && command.all_commands[command_name]
command.perform(command_name, args, config)
else
find_by_namespace("rake").perform(full_namespace, args, config)