Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge commit 'rails/master'

  • Loading branch information...
commit 50f73bd39c729b4ba4b5215b608e5767ab0aa7a1 2 parents 0002fd4 + 1b844e4
@miloops miloops authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/test/lib/fixture_template.rb
View
6 actionpack/test/lib/fixture_template.rb
@@ -12,7 +12,7 @@ def find_templates(name, details, prefix, partial)
@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 @@ def details_to_regexp(name, details, prefix, partial)
k == :formats ? formats_regexp : ''
end
end
-
+
%r'^#{Regexp.escape(path)}#{extensions}#{handler_regexp}$'
end
@@ -52,7 +52,7 @@ def details_to_regexp(name, details, prefix, partial)
# :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])
Please sign in to comment.
Something went wrong with that request. Please try again.