|
Revision 58, 441 bytes
(checked in by dema, 7 years ago)
|
|
Updating to Rails 1.1.2
|
| Line | |
|---|
| 1 | class 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 |
|---|
| 11 | end |
|---|
| 12 | |
|---|
| 13 | def helper |
|---|
| 14 | @helper_proxy ||= Object.new |
|---|
| 15 | end |
|---|
| 16 | |
|---|
| 17 | require 'application' |
|---|
| 18 | |
|---|
| 19 | class << helper |
|---|
| 20 | include_all_modules_from ActionView |
|---|
| 21 | end |
|---|
| 22 | |
|---|
| 23 | @controller = ApplicationController.new |
|---|