diff options
Diffstat (limited to 'railties/lib/console_with_helpers.rb')
-rw-r--r-- | railties/lib/console_with_helpers.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/lib/console_with_helpers.rb b/railties/lib/console_with_helpers.rb index 66a4248e0b..79018a9f76 100644 --- a/railties/lib/console_with_helpers.rb +++ b/railties/lib/console_with_helpers.rb @@ -10,8 +10,10 @@ class Module end end -def helper - @helper_proxy ||= Object.new +def helper(*helper_names) + returning @helper_proxy ||= Object.new do |helper| + helper_names.each { |h| helper.extend "#{h}_helper".classify.constantize } + end end require 'application' @@ -21,3 +23,4 @@ class << helper end @controller = ApplicationController.new +helper :application rescue nil |