From 330823687bbae1c05af6545912377d317300c1bb Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Tue, 21 Mar 2006 20:07:41 +0000 Subject: Make all ActionView helpers available in the console for debugging purposes. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/console_with_helpers.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 railties/lib/console_with_helpers.rb (limited to 'railties/lib/console_with_helpers.rb') diff --git a/railties/lib/console_with_helpers.rb b/railties/lib/console_with_helpers.rb new file mode 100644 index 0000000000..cb317583e3 --- /dev/null +++ b/railties/lib/console_with_helpers.rb @@ -0,0 +1,15 @@ +module Kernel + 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 + +require 'application' +@controller = ApplicationController.new +include_all_modules_from ActionView -- cgit v1.2.3