diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-17 07:10:27 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 07:10:27 -0600 |
commit | 404eceba8c8f0951407c2508567f6abefec76e4c (patch) | |
tree | cb8c690084083b6aee4a70ad29c24c0050f88bed /railties/lib/rails/command/base.rb | |
parent | e505bc8acd4448030fd4d2f85796bdb61d45a5b1 (diff) | |
parent | fbade51248ea48db87703ba7418badbd3ed85e36 (diff) | |
download | rails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.gz rails-404eceba8c8f0951407c2508567f6abefec76e4c.tar.bz2 rails-404eceba8c8f0951407c2508567f6abefec76e4c.zip |
Merge branch 'master' into make-reverse-merge-bang-order-consistent
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 |