2 def include_all_modules_from(parent_module
)
3 parent_module
.constants
.each
do |const
|
4 mod
= parent_module
.const_get(const
)
7 include_all_modules_from(mod
)
13 def helper(*helper_names
)
14 returning
@helper_proxy ||= Object
.new
do |helper
|
15 helper_names
.each
{ |h
| helper
.extend "#{h}_helper".classify
.constantize
}
19 require_dependency
'application'
22 include_all_modules_from ActionView
25 @controller = ApplicationController
.new
26 helper
:application rescue nil