6873fc8026
Upgraded to Rails 2.0.2, except that we maintain vendor/rails/actionpack/lib/action_controller/routing.rb from Rail 1.2.6 (at least for now), so that Routes don't change. We still get to enjoy Rails's many new features. Also fixed a bug in Chunk-handling: disable WikiWord processing in tags (for real this time).
27 lines
593 B
Ruby
27 lines
593 B
Ruby
class Module
|
|
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
|
|
|
|
def helper(*helper_names)
|
|
returning @helper_proxy ||= Object.new do |helper|
|
|
helper_names.each { |h| helper.extend "#{h}_helper".classify.constantize }
|
|
end
|
|
end
|
|
|
|
require 'application'
|
|
|
|
class << helper
|
|
include_all_modules_from ActionView
|
|
end
|
|
|
|
@controller = ApplicationController.new
|
|
helper :application rescue nil
|