diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-25 10:38:17 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-25 10:38:17 +0200 |
commit | b72d9667070521f2b40a3b307d7e5c7c66f83385 (patch) | |
tree | c065114f5c58ecf0594ad4a4b59483b031cda752 /actionpack/test | |
parent | 8843b91da70d7e4a51f7337db218489a5713dc16 (diff) | |
parent | 3aad4d7fbec6b0881733d3a9b2aff756f775ad35 (diff) | |
download | rails-b72d9667070521f2b40a3b307d7e5c7c66f83385.tar.gz rails-b72d9667070521f2b40a3b307d7e5c7c66f83385.tar.bz2 rails-b72d9667070521f2b40a3b307d7e5c7c66f83385.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/lib/fixture_template.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb index 5cf414a1c6..ee526b5de5 100644 --- a/actionpack/test/lib/fixture_template.rb +++ b/actionpack/test/lib/fixture_template.rb @@ -12,7 +12,7 @@ module ActionView #:nodoc: @hash.select { |k,v| k =~ regexp }.each do |path, source| templates << Template.new(source, path, *path_to_details(path)) end - templates + templates.sort_by {|t| -t.details.values.compact.size } end end end @@ -44,7 +44,7 @@ module ActionView #:nodoc: k == :formats ? formats_regexp : '' end end - + %r'^#{Regexp.escape(path)}#{extensions}#{handler_regexp}$' end @@ -52,7 +52,7 @@ module ActionView #:nodoc: # :api: plugin def path_to_details(path) # [:erb, :format => :html, :locale => :en, :partial => true/false] - if m = path.match(%r'(_)?[\w-]+(\.[\w-]+)*\.(\w+)$') + if m = path.match(%r'(_)?[\w-]+((?:\.[\w-]+)*)\.(\w+)$') partial = m[1] == '_' details = (m[2]||"").split('.').reject { |e| e.empty? } handler = Template.handler_class_for_extension(m[3]) |