diff options
Diffstat (limited to 'railties/lib/rails/command/base.rb')
-rw-r--r-- | railties/lib/rails/command/base.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/lib/rails/command/base.rb b/railties/lib/rails/command/base.rb index db20c71861..4f074df473 100644 --- a/railties/lib/rails/command/base.rb +++ b/railties/lib/rails/command/base.rb @@ -64,7 +64,7 @@ module Rails end def printing_commands - namespace.sub(/^rails:/, "") + namespaced_commands end def executable @@ -135,6 +135,12 @@ module Rails def command_root_namespace (namespace.split(":") - %w( rails )).first end + + def namespaced_commands + commands.keys.map do |key| + key == command_root_namespace ? key : "#{command_root_namespace}:#{key}" + end + end end def help |