diff options
Diffstat (limited to 'railties/lib/rails/command/base.rb')
-rw-r--r-- | railties/lib/rails/command/base.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/railties/lib/rails/command/base.rb b/railties/lib/rails/command/base.rb index db20c71861..cd0720be4e 100644 --- a/railties/lib/rails/command/base.rb +++ b/railties/lib/rails/command/base.rb @@ -4,7 +4,7 @@ require "erb" require "active_support/core_ext/string/filters" require "active_support/core_ext/string/inflections" -require "rails/command/actions" +require_relative "actions" module Rails module Command @@ -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 |