root/trunk/vendor/rails/railties/lib/console_with_helpers.rb @ 58

Revision 58, 441 bytes (checked in by dema, 7 years ago)

Updating to Rails 1.1.2

Line 
1class Module
2  def include_all_modules_from(parent_module)
3    parent_module.constants.each do |const|
4      mod = parent_module.const_get(const)
5      if mod.class == Module
6        send(:include, mod)
7        include_all_modules_from(mod)
8      end
9    end
10  end
11end
12
13def helper
14  @helper_proxy ||= Object.new
15end
16
17require 'application'
18
19class << helper
20  include_all_modules_from ActionView
21end
22
23@controller = ApplicationController.new
Note: See TracBrowser for help on using the browser.