diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-11-23 13:42:07 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-11-23 13:42:07 -0600 |
commit | 2c01f2b4e9d4a95bb2baca8ae57209eb10aa78b2 (patch) | |
tree | 7ef23887bc8642b99d9b99736ccccf89eaf5a6d9 /actionpack/lib/action_view/helpers.rb | |
parent | e201fc750bf4b7dff1875b7fcdd47f1686ef2052 (diff) | |
download | rails-2c01f2b4e9d4a95bb2baca8ae57209eb10aa78b2.tar.gz rails-2c01f2b4e9d4a95bb2baca8ae57209eb10aa78b2.tar.bz2 rails-2c01f2b4e9d4a95bb2baca8ae57209eb10aa78b2.zip |
use autoload instead of explicit requires for ActionView
Diffstat (limited to 'actionpack/lib/action_view/helpers.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers.rb | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/helpers.rb b/actionpack/lib/action_view/helpers.rb index ff97df204c..de8682560f 100644 --- a/actionpack/lib/action_view/helpers.rb +++ b/actionpack/lib/action_view/helpers.rb @@ -1,10 +1,28 @@ -Dir.entries(File.expand_path("#{File.dirname(__FILE__)}/helpers")).sort.each do |file| - next unless file =~ /^([a-z][a-z_]*_helper).rb$/ - require "action_view/helpers/#{$1}" -end - module ActionView #:nodoc: module Helpers #:nodoc: + autoload :ActiveRecordHelper, 'action_view/helpers/active_record_helper' + autoload :AssetTagHelper, 'action_view/helpers/asset_tag_helper' + autoload :AtomFeedHelper, 'action_view/helpers/atom_feed_helper' + autoload :BenchmarkHelper, 'action_view/helpers/benchmark_helper' + autoload :CacheHelper, 'action_view/helpers/cache_helper' + autoload :CaptureHelper, 'action_view/helpers/capture_helper' + autoload :DateHelper, 'action_view/helpers/date_helper' + autoload :DebugHelper, 'action_view/helpers/debug_helper' + autoload :FormHelper, 'action_view/helpers/form_helper' + autoload :FormOptionsHelper, 'action_view/helpers/form_options_helper' + autoload :FormTagHelper, 'action_view/helpers/form_tag_helper' + autoload :JavascriptHelper, 'action_view/helpers/javascript_helper' + autoload :NumberHelper, 'action_view/helpers/number_helper' + autoload :PrototypeHelper, 'action_view/helpers/prototype_helper' + autoload :RecordIdentificationHelper, 'action_view/helpers/record_identification_helper' + autoload :RecordTagHelper, 'action_view/helpers/record_tag_helper' + autoload :SanitizeHelper, 'action_view/helpers/sanitize_helper' + autoload :ScriptaculousHelper, 'action_view/helpers/scriptaculous_helper' + autoload :TagHelper, 'action_view/helpers/tag_helper' + autoload :TextHelper, 'action_view/helpers/text_helper' + autoload :TranslationHelper, 'action_view/helpers/translation_helper' + autoload :UrlHelper, 'action_view/helpers/url_helper' + def self.included(base) base.extend(ClassMethods) end |