diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-10 22:11:48 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-10 22:13:29 +0100 |
commit | 07cf49aadf3195db6ddefc58932efc88a6704a09 (patch) | |
tree | d62f0249570565d3f5dee15410627fce4aae2e90 /actionpack/lib/action_view/template/resolver.rb | |
parent | ec0973c2abeb80eb3c93c5df070592da56ef5b7c (diff) | |
download | rails-07cf49aadf3195db6ddefc58932efc88a6704a09.tar.gz rails-07cf49aadf3195db6ddefc58932efc88a6704a09.tar.bz2 rails-07cf49aadf3195db6ddefc58932efc88a6704a09.zip |
Optimize and clean up how details key get expired.
Diffstat (limited to 'actionpack/lib/action_view/template/resolver.rb')
-rw-r--r-- | actionpack/lib/action_view/template/resolver.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb index c43b357e9e..a43597e728 100644 --- a/actionpack/lib/action_view/template/resolver.rb +++ b/actionpack/lib/action_view/template/resolver.rb @@ -21,6 +21,7 @@ module ActionView # Normalizes the arguments and passes it on to find_template. def find_all(name, prefix=nil, partial=false, details={}, key=nil) name, prefix = normalize_name(name, prefix) + details = details.merge(:handlers => default_handlers) cached(key, prefix, name, partial) do find_templates(name, prefix, partial, details) @@ -33,6 +34,10 @@ module ActionView @caching ||= !defined?(Rails.application) || Rails.application.config.cache_classes end + def default_handlers + Template::Handlers.extensions + [nil] + end + # This is what child classes implement. No defaults are needed # because Resolver guarantees that the arguments are present and # normalized. |