Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

simplify console with helpers

  • Loading branch information...
commit d75a2345015046e08f8191748f0e246e1b9f9703 1 parent d361587
Joshua Peek josh authored
1  actionpack/lib/action_view/helpers.rb
View
@@ -42,6 +42,7 @@ module ClassMethods
include FormHelper
include FormOptionsHelper
include FormTagHelper
+ include JavaScriptHelper
include NumberHelper
include PrototypeHelper
include RecordIdentificationHelper
23 railties/lib/console_with_helpers.rb
View
@@ -1,24 +1,5 @@
-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
-
-class << helper
- include_all_modules_from ActionView
+def helper
+ @helper ||= ApplicationController.helpers
end
@controller = ApplicationController.new
-helper :application rescue nil
Please sign in to comment.
Something went wrong with that request. Please try again.