require 'action_controller/helpers' module ActionController #:nodoc: module Helpers #:nodoc: private # in Ruby 1.9.3 and Rails 2.3, every controller MUST # have a helper. see http://groups.google.com/group/rubyonrails-core/browse_thread/thread/81be70a119260e59 # This sucks, lets monkeypatch it! def default_helper_module! unless name.blank? module_name = name.sub(/Controller$|$/, 'Helper') module_path = module_name.split('::').map { |m| m.underscore }.join('/') require_dependency module_path helper module_name.constantize end rescue MissingSourceFile => e raise unless e.is_missing? module_path rescue NameError => e raise unless e.missing_name? module_name # added hackery starts here # this is the missing rescue! rescue LoadError => e puts "no helper found for controller #{name}" end end end