diff options
Diffstat (limited to 'railties/lib/console_with_helpers.rb')
-rw-r--r-- | railties/lib/console_with_helpers.rb | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/railties/lib/console_with_helpers.rb b/railties/lib/console_with_helpers.rb index be453a6896..039db667c4 100644 --- a/railties/lib/console_with_helpers.rb +++ b/railties/lib/console_with_helpers.rb @@ -1,26 +1,5 @@ -class Module - def include_all_modules_from(parent_module) - parent_module.constants.each do |const| - mod = parent_module.const_get(const) - if mod.class == Module - send(:include, mod) - include_all_modules_from(mod) - end - end - end -end - -def helper(*helper_names) - returning @helper_proxy ||= Object.new do |helper| - helper_names.each { |h| helper.extend "#{h}_helper".classify.constantize } - end -end - -require_dependency 'application' - -class << helper - include_all_modules_from ActionView +def helper + @helper ||= ApplicationController.helpers end @controller = ApplicationController.new -helper :application rescue nil |