diff options
Diffstat (limited to 'railties/lib/rails/console/helpers.rb')
-rw-r--r-- | railties/lib/rails/console/helpers.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/rails/console/helpers.rb b/railties/lib/rails/console/helpers.rb new file mode 100644 index 0000000000..b775f1ff8d --- /dev/null +++ b/railties/lib/rails/console/helpers.rb @@ -0,0 +1,17 @@ +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 + end +end |