aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/console/helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/console/helpers.rb')
-rw-r--r--railties/lib/rails/console/helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/console/helpers.rb b/railties/lib/rails/console/helpers.rb
index 039db667c4..212fc6125a 100644
--- a/railties/lib/rails/console/helpers.rb
+++ b/railties/lib/rails/console/helpers.rb
@@ -2,4 +2,6 @@ def helper
@helper ||= ApplicationController.helpers
end
-@controller = ApplicationController.new
+def controller
+ @controller ||= ApplicationController.new
+end