From 53a0b8c66226d2114859dccdd42810c01a25551a Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 2 May 2024 20:33:47 +0100 Subject: [PATCH] Improve Rails console helper methods' descriptions --- railties/lib/rails/commands/console/irb_console.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/railties/lib/rails/commands/console/irb_console.rb b/railties/lib/rails/commands/console/irb_console.rb index 14c7cf908e31a..088b64f4f8c55 100644 --- a/railties/lib/rails/commands/console/irb_console.rb +++ b/railties/lib/rails/commands/console/irb_console.rb @@ -10,7 +10,7 @@ class RailsHelperBase < IRB::HelperMethod::Base end class ControllerHelper < RailsHelperBase - description "Gets the helper methods available to the controller." + description "Gets helper methods available to ApplicationController." # This method assumes an +ApplicationController+ exists, and that it extends ActionController::Base. def execute @@ -19,7 +19,7 @@ def execute end class ControllerInstance < RailsHelperBase - description "Gets a new instance of a controller object." + description "Gets a new instance of ApplicationController." # This method assumes an +ApplicationController+ exists, and that it extends ActionController::Base. def execute @@ -28,7 +28,7 @@ def execute end class NewSession < RailsHelperBase - description "Create a new session. If a block is given, the new session will be yielded to the block before being returned." + description "[Deprecated] Please use `app(true)` instead." def execute(*) app = Rails.application @@ -43,7 +43,7 @@ def execute(*) end class AppInstance < NewSession - description "Reference the global 'app' instance, created on demand. To recreate the instance, pass a non-false value as the parameter." + description "Creates a new ActionDispatch::Integration::Session and memoizes it. Use `app(true)` to create a new instance." def execute(create = false) @app_integration_instance = nil if create @@ -55,7 +55,7 @@ class Reloader < IRB::Command::Base include ConsoleMethods category "Rails console" - description "Reloads the environment." + description "Reloads the Rails application." def execute(*) puts "Reloading..."