diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-12 22:07:18 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-12 22:07:18 +0000 |
commit | 89840c40ceb54855fa81e641586abba04c3e35cb (patch) | |
tree | 5edb8e29b83f952c9cb8919d87797f88861a96c0 /actionpack/lib/action_view | |
parent | 7661c2b50aa5ab6d497d6e41cf53545136c4bd37 (diff) | |
download | rails-89840c40ceb54855fa81e641586abba04c3e35cb.tar.gz rails-89840c40ceb54855fa81e641586abba04c3e35cb.tar.bz2 rails-89840c40ceb54855fa81e641586abba04c3e35cb.zip |
Load helpers in alphabetical order for consistency. Resolve cyclic javascript_helper dependency. Closes #6132, closes #6178.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5095 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/prototype_helper.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index f3e2347d45..2f12bdb3c4 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -200,7 +200,7 @@ module ActionView #:nodoc: end def self.load_helpers(helper_dir)#:nodoc: - Dir.foreach(helper_dir) do |helper_file| + Dir.entries(helper_dir).sort.each do |helper_file| next unless helper_file =~ /^([a-z][a-z_]*_helper).rb$/ require File.join(helper_dir, $1) helper_module_name = $1.camelize diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index d5e6f039aa..322b7e7978 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -1,4 +1,3 @@ -require File.dirname(__FILE__) + '/javascript_helper' require 'set' module ActionView @@ -926,3 +925,5 @@ module ActionView end end end + +require File.dirname(__FILE__) + '/javascript_helper' |