aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/console_with_helpers.rb
blob: 66a4248e0b23ecd799ac8817b19fdae7daa56d51 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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_proxy ||= Object.new 
end

require 'application'

class << helper 
  include_all_modules_from ActionView
end

@controller = ApplicationController.new