From 3c6767cadedce64119ceef25ce97a03784ebd41f Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Thu, 18 Jul 2013 16:18:04 +0200 Subject: document the Rails::ConsoleMethods#helper and #controller methods Closes rails/rails#11362 --- railties/lib/rails/console/helpers.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/console/helpers.rb b/railties/lib/rails/console/helpers.rb index 230d3d9d04..efc27953e5 100644 --- a/railties/lib/rails/console/helpers.rb +++ b/railties/lib/rails/console/helpers.rb @@ -1,9 +1,15 @@ module Rails module ConsoleMethods + # Gets the helper methods available to the controller. + # + # This method assumes an `ApplicationController` exists, and it extends `ActionController::Base` def helper @helper ||= ApplicationController.helpers end + # Gets a new instance of a controller object. + # + # This method assumes an `ApplicationController` exists, and it extends `ActionController::Base` def controller @controller ||= ApplicationController.new end -- cgit v1.2.3