diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-10-16 11:26:19 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-10-16 11:26:19 -0700 |
commit | a565c19c5ba465c74a465b55be97a4abfb760e20 (patch) | |
tree | 19879f8961a6527af1786201cfbb5607b9b88f80 /actionpack/lib | |
parent | 471a394215e01ffae03bbafa027a44f63e0658b8 (diff) | |
download | rails-a565c19c5ba465c74a465b55be97a4abfb760e20.tar.gz rails-a565c19c5ba465c74a465b55be97a4abfb760e20.tar.bz2 rails-a565c19c5ba465c74a465b55be97a4abfb760e20.zip |
Fix a bug where templates with locales were not being sorted correctly
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index f5591ead09..7336114e1b 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -121,7 +121,7 @@ module ActionView # # :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]) |