aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/command/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/command/base.rb')
-rw-r--r--railties/lib/rails/command/base.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/railties/lib/rails/command/base.rb b/railties/lib/rails/command/base.rb
index 1efcd69e63..1435792536 100644
--- a/railties/lib/rails/command/base.rb
+++ b/railties/lib/rails/command/base.rb
@@ -22,7 +22,7 @@ module Rails
# Tries to get the description from a USAGE file one folder above the command
# root.
- def desc(usage = nil, description = nil)
+ def desc(usage = nil, description = nil, options = {})
if usage
super
else
@@ -56,7 +56,7 @@ module Rails
end
def perform(command, args, config) # :nodoc:
- command = nil if Thor::HELP_MAPPINGS.include?(args.first)
+ command = nil if Rails::Command::HELP_MAPPINGS.include?(args.first)
dispatch(command, args.dup, nil, config)
end
@@ -130,6 +130,14 @@ module Rails
end
end
end
+
+ def help
+ if command_name = self.class.command_name
+ self.class.command_help(shell, command_name)
+ else
+ super
+ end
+ end
end
end
end