aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r--railties/lib/rails/commands/help/USAGE13
-rw-r--r--railties/lib/rails/commands/rake/rake_command.rb6
2 files changed, 16 insertions, 3 deletions
diff --git a/railties/lib/rails/commands/help/USAGE b/railties/lib/rails/commands/help/USAGE
index 0f6ff756ce..348f41861f 100644
--- a/railties/lib/rails/commands/help/USAGE
+++ b/railties/lib/rails/commands/help/USAGE
@@ -1,5 +1,16 @@
Usage: bin/rails COMMAND [args] [options]
+<% if engine? %>
+The common Rails commands available for engines are:
+ generate Generate new code (short-cut alias: "g")
+ destroy Undo code generated with "generate" (short-cut alias: "d")
+ test Run tests (short-cut alias: "t")
+All commands can be run with -h for more information.
+
+If you want to run any commands that need to be run in context
+of the application, like `bin/rails server` or `bin/rails console`,
+you should do it from the application's directory (typically test/dummy).
+<% else %>
The most common rails commands are:
generate Generate new code (short-cut alias: "g")
console Start the Rails console (short-cut alias: "c")
@@ -11,6 +22,6 @@ The most common rails commands are:
new application called MyApp in "./my_app"
All commands can be run with -h (or --help) for more information.
-
+<% end %>
In addition to those commands, there are:
diff --git a/railties/lib/rails/commands/rake/rake_command.rb b/railties/lib/rails/commands/rake/rake_command.rb
index a4a2464445..a43c884170 100644
--- a/railties/lib/rails/commands/rake/rake_command.rb
+++ b/railties/lib/rails/commands/rake/rake_command.rb
@@ -1,6 +1,8 @@
module Rails
module Command
class RakeCommand < Base
+ extend Rails::Command::Actions
+
namespace "rake"
class << self
@@ -27,12 +29,12 @@ module Rails
return @rake_tasks if defined?(@rake_tasks)
ActiveSupport::Deprecation.silence do
- Rails::Command.require_application_and_environment!
+ require_application_and_environment!
end
Rake::TaskManager.record_task_metadata = true
Rake.application.instance_variable_set(:@name, "rails")
- Rails.application.load_tasks
+ load_tasks
@rake_tasks = Rake.application.tasks.select(&:comment)
end