diff options
author | Marcel Molina <marcel@vernix.org> | 2006-03-23 21:56:38 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2006-03-23 21:56:38 +0000 |
commit | cb069ea7cc0c530b6d1a3cbd636d728568b3f041 (patch) | |
tree | 70b9e4b484bd7a0e6f67877fa57a3d0d60ebe9dc /railties/lib | |
parent | 4a968d464b32f83856761c60135e29326c6245fc (diff) | |
download | rails-cb069ea7cc0c530b6d1a3cbd636d728568b3f041.tar.gz rails-cb069ea7cc0c530b6d1a3cbd636d728568b3f041.tar.bz2 rails-cb069ea7cc0c530b6d1a3cbd636d728568b3f041.zip |
Don't polute the top level namespace in the console with ActionView helpers. Make them available from a helper method.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/console_with_helpers.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/railties/lib/console_with_helpers.rb b/railties/lib/console_with_helpers.rb index cb317583e3..66a4248e0b 100644 --- a/railties/lib/console_with_helpers.rb +++ b/railties/lib/console_with_helpers.rb @@ -1,4 +1,4 @@ -module Kernel +class Module def include_all_modules_from(parent_module) parent_module.constants.each do |const| mod = parent_module.const_get(const) @@ -10,6 +10,14 @@ module Kernel end end +def helper + @helper_proxy ||= Object.new +end + require 'application' + +class << helper + include_all_modules_from ActionView +end + @controller = ApplicationController.new -include_all_modules_from ActionView |