aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/console_with_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/console_with_helpers.rb')
-rw-r--r--railties/lib/console_with_helpers.rb15
1 files changed, 15 insertions, 0 deletions
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